Discovering namespaces

PublishedMarch 28, 2014

Next point on the journey of discovery through CIM is finding the namespaces installed on a machine. I showed how to do this using Get-WmiObject in PowerShell and WMI but this time round decided to come up to date and use Get-CimInstance

This simply searches for instances of the __NameSpace class in a given starting name space. Default is root/cimv2. By using select-object to create a calculated field I can append the name of the namespace to the current namespace to get the full path.

Next time I’ll show how to use recursion to dig through the namespaces we’re discovering to find any namespaces they contain.