Up until now I have been using remote desktop to log on to close to 500 machines on our domain and running a single executable that requires no input or interaction from me. I would like to know if anyone has seen any scripts to do such a thing automaticly.
The closest I found so far was a vbs file attached below.
The closest I found so far was a vbs file attached below.
Code:
' Variable Declarations
Dim strRemotePC, objLocator, objService, objWMIService
Dim szTzKey, process, processid, result, strUpdateCommand
' Enter the timeZone you wish to set here. If the name contains spaces, it must be in quotes
szTzKey = "Mountain Standard Time"
On Error Resume Next
' Main
strRemotePC = InputBox("Enter the computer name. ")
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer(strRemotePC, "Root\DEFAULT")
If Err.Number <> 0 Then
WScript.Echo "Unable to connect to " & strRemotePC & ", Error " & Err.Number & "," & Err.Description
Err.Clear
Else
Set process = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strRemotePC & "\root\cimv2:Win32_process")
' Add time change privilege to the process object
process.Security_.Privileges.AddAsString "SeSystemTimePrivilege",True
strUpdateCommand = "control.exe timedate.cpl,,/Z" & szTzKey
'Launch control.exe to refresh time zone information using the TZ key name obtained above
result = process.create(strUpdateCommand,Null,Null,processid)
If result <> 0 Then
Wscript.Echo "Error " & result & "Occurred"
Wscript.Quit 0
Else
Wscript.Echo "Control.exe started with process ID of " & processid & "."
End If
End If