.bat脚本将windows server 2008设置成ntp时间同步服务器


@echo off
echo autor OAK
@echo off
echo --------------------------------
@echo off
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters /v LocalNTP /t REG_DWORD /d 00000001 /f
@echo off
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer /v Enabled /t REG_DWORD /d 00000001 /f
@echo off
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config /v AnnounceFlags /t REG_DWORD /d 00000005 /f
@echo off
SC CONFIG w32time START= auto
@echo off
net stop w32time
net start w32time

你可能感兴趣的:(wx)