April 23rd, 2013

PowerTip: Use PowerShell to Find WMI Classes Related to Disks

Doctor Scripto
Scripter

Summary: Use Windows PowerShell 3.0 to help find WMI classes related to disks.

Hey, Scripting Guy! Question How can I find WMI classes that will return information about disks on my local computer?

Hey, Scripting Guy! Answer Use the Get-CimClass cmdlet in Windows PowerShell 3.0. Use a wildcard character for the class name, and use the QualifierName parameter to filter only dynamic WMI classes:

Get-CimClass -ClassName *disk* -QualifierName dynamic

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.