PowerTip: Search All WMI Namespaces with PowerShell

Dr Scripto

Summary: Learn to look for WMI classes in all WMI namespaces by using Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to search all WMI namespaces so that
          I can find all WMI classes that are related to batteries?

Hey, Scripting Guy! Answer Use the Get-WmiObject cmdlet, start at the Root namespace, and make sure to use the –recurse switch:

Get-WMIObject -Namespace root -ClassName *battery* -list -recurse -EA 0


Comments are closed. Login to edit/delete your existing comments