Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
 Scripting API Object Model
Scripting API Object Model

The following diagram shows the relationships between WMI scripting objects.

 

Relationships between WMI scripting objects

 

 

 

Send comments about this topic to Microsoft

Build date: 1/8/2010

Build type: MSDN

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
WMI Scripting Using PowerShell      Thomas Lee   |   Edit   |   Show History
Scripting WMI with PowerShell is far simpler than with using the above mentioned API.

To get instances of a particular WMI class - just use get-wmiobject specifying class and (where needed) the namespace. For example:
PS C:\Documents ad Settings\LeeT> get-wmiobject win32_share | ft -auto
Name   Path                               Description          
---- ---- -----------
E$ E:\ Default share
IPC$ Remote IPC
D$ D:\ Default share
print$ C:\WINDOWS\system32\spool\drivers Printer Drivers
phaser Xerox Phaser 8560N PS,LocalsplOnly Xerox Phaser 8560N PS
ADMIN$ C:\WINDOWS Remote Admin
C$ C:\ Default share
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker