What is the 64 bit equivalent of Win32_OperatingSystem?
- by Jim
I inherited a script running on Server 2003 that I need to port to Server 2008. The current script is:
strComputer = "servernamexyz"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & _
strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("SELECT * FROM Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Win32Shutdown(12)
Next
How do I convert this to run on Server 2008? Thanks!