js-bts
(JS-BTS)
1
Hi,
We have a client who has some machines which are still trying to sync with a DC (I believe this has been decommissioned) and they’d like their machines to stop trying to sync their time with this, and we’d like to do this via Powershell.
What’s the best approach for this? Ideally, I’d like to set their time to sync with time.windows.com.
Please let me know if you need any more information - and thank you in advance!
EDIT:
Thanks for the responses - not sure if it’s perfect, but the below seems to have worked a charm:
Stop-Service W32Time
Start-Service W32Time
w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update
Set-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers' -Name '(Default)' -Value '1'
w32tm /resync
2 Spice ups
Neally
(Neally)
2
What have you tried? where are you stuck?
Most commands will be just same old w32tm / whatever you want to use.
You don’t want to sync from the new Domain Controller?
You can specify a custom NTP server in the reg key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers
If you post code, please use the ‘Insert Code’ button. Please and thank you!
2 Spice ups
jitensh
(JitenSh)
3
simply run command
w32tm /config /manualpeerlist:"time.windows.com,0x1" /syncfromflags:manual /reliable:yes /update
w32tm /config /update
net stop w32time && net start w32time
w32tm /resync
also, see if any GPO is pointing to old DC
2 Spice ups
js-bts
(JS-BTS)
4
@alexw
@jitensh
Thanks both for your responses - they’ve helped put me in the right direction. Seems I’ve managed to work out a solution that looks to have ticked all the boxes (pending some further testing) - I’ve added this to my original post.