Time Sync Compliance
Summary
This monitor will sync the machine's time with us.pool.ntp.org.
Monitor
-
Navigate to
Endpoints
>Alerts
>Monitors
-
Click the
Create Monitor
button. -
This screen will appear.
-
Name: Time Sync Compliance
Description: This monitor will sync machine time with us.pool.ntp.org.
Type: Script
Family: Desktop Operating System
Severity: Others -
The
Conditions
tab will start looking like this: -
Set the
Repeat every
to24
Hours: -
Disable the
Ticket Resolution
section by clicking theAutomatically resolve
button. -
Paste this PowerShell script in the
Script
box.$S = 'W32Time';
$peerList = 'us.pool.ntp.org';
$syncOutput = '';
if ((Get-Service $S).Status -ne 'Running')
{Try
{Start-Service $S -Confirm:$False -ErrorAction Stop | Out-Null}
catch
{return "Failed to start $S Service. Reason: $($Error.Exception.Message)"}
};
$syncOutput += w32tm /config /manualpeerlist:$peerList;
Start-Sleep -Seconds 5;
$syncOutput += "`n" + (W32tm /resync /force);
if ($syncOutput -match 'The computer did not resync')
{return 'Failed: The computer did not resync.'}
else
{return 'Success: The computer resynced successfully.'} -
Set
Failed
to theScript Output
box. -
Select the required client or group to target from the
Select Targets
button.
-
Monitors Final Look
-
Click the
Save
button to save the monitor set.