You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
411 B
11 lines
411 B
Set Args = wscript.Arguments
|
|
RpNum = Args.item(0)
|
|
Set obj = GetObject("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")
|
|
if obj.Restore(RpNum) <> 0 Then
|
|
wscript.Echo "Restore failed"
|
|
End If
|
|
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
|
|
for each OpSys in OpSysSet
|
|
OpSys.Reboot()
|
|
next
|
|
|