A scripting for rebooting system

strComputer  =   " . "
Set  objWMIService  =   GetObject ( " winmgmts: "  _
    
&   " {impersonationLevel=impersonate,(Shutdown)}!\ "   &  strComputer  &   " ootcimv2 " )
Set  colOperatingSystems  =  objWMIService.ExecQuery _
    (
" Select * from Win32_OperatingSystem " )
For   Each  objOperatingSystem in colOperatingSystems
    ObjOperatingSystem.Reboot()
Next


Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=458734


你可能感兴趣的:(script)