What is the 64 bit equivalent of Win32_OperatingSystem?

Posted by Jim on Stack Overflow See other posts from Stack Overflow or by Jim
Published on 2010-05-05T17:11:27Z Indexed on 2010/05/05 17:58 UTC
Read the original article Hit count: 224

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!

© Stack Overflow or respective owner

Related posts about vbscript

Related posts about windows-server-2008