diff --git a/src/application/collections/windows.yaml b/src/application/collections/windows.yaml index 9b7e5c26..f0db8e7d 100644 --- a/src/application/collections/windows.yaml +++ b/src/application/collections/windows.yaml @@ -4342,23 +4342,23 @@ actions: code: |- :: Configure time source w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" - :: Restart time service if running + :: Stop time service if running SC queryex "w32time"|Find "STATE"|Find /v "RUNNING">Nul||( net stop w32time - net start w32time ) - :: Sync now + :: Start time service and sync now + net start w32time w32tm /config /update w32tm /resync revertCode: |- :: Configure time source w32tm /config /syncfromflags:manual /manualpeerlist:"time.windows.com" - :: Restart time service if running + :: Stop time service if running SC queryex "w32time"|Find "STATE"|Find /v "RUNNING">Nul||( net stop w32time - net start w32time ) - :: Sync now + :: Start time servie and sync now + net start w32time w32tm /config /update w32tm /resync -