To list the WMI namespaces directly under root on a computer, run Get-CimInstance -Namespace root -ClassName __Namespace. To inventory namespaces at every level, enumerate recursively from root: a query of one namespace returns only its immediate child namespaces.
List the namespaces directly under root
Run this in PowerShell on the computer you want to inspect:
Get-CimInstance -Namespace root -ClassName __Namespace
Microsoft documents this as retrieving namespaces under the root namespace on a WMI server. The __Namespace system class represents a WMI namespace, and each returned instance’s Name property contains the child namespace name. See Get-CimInstance and the __Namespace class reference.
For a cleaner list containing only names, expand that property:
#1 Best Overall
Get-CimInstance -Namespace root -ClassName __Namespace | Select-Object -ExpandProperty Name
Specify -Namespace root when you mean root’s children. Get-CimInstance defaults to root/CIMV2, so omitting the parameter queries a different part of the hierarchy.
List every namespace recursively
WMI namespaces form a hierarchy. The command above shows only the immediate children of the namespace you query; it does not automatically include their descendants. Microsoft says a complete system enumeration requires a recursive query beginning at root. The namespaces are logical databases, not folders on disk. See Microsoft’s WMI overview.
Rank #2
- Book - powershell for sysadmins: workflow automation made easy
- Language: english
- Binding: paperback
For a recursive example, Microsoft’s __Namespace documentation shows this legacy command:
Get-WmiObject __namespace -namespace 'root' -list -recurse | Format-Table __namespace
Get-WmiObject is a legacy cmdlet; Microsoft says it was superseded by Get-CimInstance beginning with Windows PowerShell 3.0. For current scripts, use the CIM cmdlet where it meets your needs. The legacy recursive example illustrates the required traversal, but do not mistake the one-level CIM command for a recursive inventory. See Get-WmiObject documentation.
Recommended Free Tools
Rank #3
Query a different branch of the hierarchy
To inspect children under another namespace, set -Namespace to that namespace. For example, to list children beneath root/CIMV2/Applications:
Get-CimInstance -Namespace 'root/CIMV2/Applications' -ClassName __Namespace
As with the root query, this returns only direct children of the chosen namespace.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What to expect from the results
There is no universal fixed list to expect: results come from the WMI server you query and can vary with the computer’s configuration and installed providers. Query the intended local or remote computer rather than relying on a list from another system. WMI namespaces are also distinct from Windows PowerShell providers; the two are separate concepts, as Microsoft’s WMI overview explains.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

