The Help file and examples is a great way to learn.
but to put incode what water said :
$iResult = RunWait(@ComSpec & ' /c ' & "net stop w32time", @TempDir, @SW_HIDE)
If $iResult = 1 Then
MsgBox(16, "error", "Error Stopping time")
Exit
EndIf
$iResult = RunWait(@ComSpec & ' /c ' & "net time /setsntp:time.windows.com", @TempDir, @SW_HIDE)
If $iResult = 1 Then
MsgBox(16, "error", "Error setting time")
Exit
EndIf
$iResult = RunWait(@ComSpec & ' /c ' & "net start w32time", @TempDir, @SW_HIDE)
If $iResult = 1 Then
MsgBox(16, "error", "Error starting time")
Exit
Else
MsgBox(0, "Success", "Completed")
EndIf