on Windows Management Instrumentation

I have a bit versed into powershell over the last months, I just cannot stop discovering new gems.

Ex : Win32 Classes

Self-explanatory examples :

PS> (get-wmiobject win32_processor).currentclockspeed
3292
PS> (get-wmiobject win32_operatingsystem).version
5.1.2600
PS> (get-wmiobject win32_proxy).ProxyServer
proxy.example.com
PS> (get-wmiobject win32_proxy).ProxyPortNumber
8080

it goes on and on and on… the ways those things are accessible from the prompt in interactive command line mode or within a script is amazing me

5 thoughts on “on Windows Management Instrumentation

  1. Thomas Lee

    Welcome to the wonderful world of PowerShell. Glad you are liking WMI – you have a lot more to discover. Take a look at Ravikanth’s WMI Query Language ebook for lots more detail on WMI Query Langague and WMI eventing. Look at Richard Siddaway’s book on PowerShell and WMI.

    And to learn more – why not come over to PowerShell.Com and join in the forums etc.

  2. Laurent Schneider Post author

    Oh yes, I love it from the first page !!!

    PS> (Get-WMIObject -query "select freespace from Win32_LogicalDisk where deviceid='C:'").freespace/1e9
    455.840509952

Comments are closed.