Getting Help on WMI Methods

Have you ever wanted to get a list of all WMI methods present inside a specific WMI class – plus a meaningful description and a list of all the supported return values? Here is how:

$class = [wmiclass]"Win32_NetworkAdapterConfiguration"
$class.psbase.Options.UseAmendedQualifiers = $true
$class.psbase.methods | % { $rv = 1 | Select-Object Name, Help; $rv.Name = $_.Name; $rv.help = ($_.Qualifiers["Description"]).Value; $rv } | format-table -AutoSize -Wrap

Twitter This Tip! ReTweet this Tip!


Posted Jul 30 2010, 08:00 AM by ps1

Comments

Andrew Tearle wrote re: Getting Help on WMI Methods
on 07-30-2010 10:51 AM

Excellent. Thanx Tobias.

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.