Some useful windows scripts (For Windows 10)

Disable Windows 10 automatic updates:

#Stop Background intelligent transfer service.
NET STOP "wuauserv" 
#Disable the service 
sc config wuauserv start=disabled

To re-enable Windows 10 automatic updates:

#The service must be enabled before it can be started
sc config wuauserv start=auto
#Start the service
NET START "wuauserv" 
#If this doesnt work, enable BITS

Force a clock sync:

#The service must be enabled before it can be started
sc config W32Time start=auto
#Start the service
net start W32Time
#Now update time
C:\Windows\System32\w32tm.exe /resync /force