PowerShell for Windows Admins

Mar 21 2011   1:15PM GMT

Documenting WMI



Posted by: Richard Siddaway
Tags:
PowerShell v2
WMI

Its been said many times that tracking down documentation on WMI classes can be difficult. This script will help to some degree

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
function get-wmidoc {
param
 (
 
[string]$class
)

$data = Get-WmiObject -List $class -Amended 

"Methods"
$data | select -ExpandProperty methods

"Properties"
$data | select -ExpandProperty properties

"Qualifiers"
$data | select -ExpandProperty qualifiers

}

Take a WMI class name as a parameter (assumes that using root\cimv2 namespace but could add namespace as another parameter) then get the amended listing.  The methods, properties and qualifiers can be displayed.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: