Created
July 26, 2019 00:15
-
-
Save t2psyto/19f5e1084ebf11292a283a1a1aeab79b to your computer and use it in GitHub Desktop.
リモートからWMI許可する設定。ボリューム ライセンス認証管理ツールでプロキシライセンス認証するためのクライアント側設定。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem == リモートからWMI許可する設定 == | |
rem | |
rem 参考:: | |
rem VAMT を使用したライセンス管理 – Part1 | MCTの憂鬱 | |
rem https://mctjp.com/2015/03/05/vamt-%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E7%AE%A1%E7%90%86-part1/ | |
rem | |
rem VAMT を使用したライセンス管理 – Part2 | MCTの憂鬱 | |
rem https://mctjp.com/2015/03/05/vamt-%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E7%AE%A1%E7%90%86-part2/ | |
rem | |
rem ---- 管理者モード か判定 ---- | |
openfiles > NUL 2>&1 | |
if %ERRORLEVEL% EQU 0 goto AdminMode | |
echo 一般権限で実行されています。 | |
goto End | |
:AdminMode | |
echo 管理者権限で実行中 | |
goto Main | |
rem ---- Main ---- | |
:Main | |
pause | |
@echo on | |
set POLICY_NAME="Windows Management Instrumentation (DCOM 受信)" | |
netsh advfirewall firewall set rule name=%POLICY_NAME% profile=private,public new profile=private,public enable=yes | |
netsh advfirewall firewall set rule name=%POLICY_NAME% profile=domain new profile=domain enable=yes | |
set POLICY_NAME="Windows Management Instrumentation (WMI 受信)" | |
netsh advfirewall firewall set rule name=%POLICY_NAME% profile=private,public new profile=private,public enable=yes | |
netsh advfirewall firewall set rule name=%POLICY_NAME% profile=domain new profile=domain enable=yes | |
set POLICY_NAME="Windows Management Instrumentation (非同期受信)" | |
netsh advfirewall firewall set rule name=%POLICY_NAME% profile=private,public new profile=private,public enable=yes | |
netsh advfirewall firewall set rule name=%POLICY_NAME% profile=domain new profile=domain enable=yes | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f | |
:End | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment