API Reference
Class
NtpWriter
Writer for Windows Time (W32Time) client configuration. Sets Type (NTP/NT5DS/AllSync/NoSync), NtpServer (CSV; flags 0x9 used by default), and SpecialPollInterval. Optionally restarts the service.
Inheritance
- Object
- NtpWriter
Methods
public static Boolean Set(String computerName, String type, String[] servers, Nullable<Int32> specialPollInterval, Boolean restartService = false) #Returns:
BooleanApplies NTP settings. Returns true when all writes succeed; restart and resync are best-effort.
Parameters
- computerName System.String
- Target host ("." or machine name).
- type System.String
- NTP, NT5DS, AllSync, or NoSync.
- servers System.String[]
- Server names (without flags). Will be encoded as server,0x9 by default.
- specialPollInterval System.Nullable{System.Int32}
- Seconds between polls in SpecialPoll mode. Null to skip.
- restartService System.Boolean = false
- Restart W32Time service after applying.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object