Search notes:

WMI Namespaces

WMI classes are hierarchically organized into namespaces.
Some namespaces (such as root\default, root\cimv2, root\subscription…) are created when the system boots up.
The name of the default namespace is ROOT/cimv2 (see Default Namespace under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\Scripting).
The namespaces in a given namespace (for example root) can be shown like so:
PS C:\> get-cimInstance -namespace root -class __namespace | sort name

Name            PSComputerName
----            --------------
CIMV2
Cli
DEFAULT
directory
Hardware
Interop
Microsoft
msdtc
PEH
RSOP
SECURITY
SecurityCenter
SecurityCenter2
ServiceModel
StandardCimv2
subscription
WMI
Similarly, the following command shows the namespaces under ROOT\CIMV2 (which happens to be he default namespace):
PS C:\> get-cimInstance -namespace root\cimv2 -class __namespace | sort name
The classes in given namespace can be showns like so:
PS C:\> get-cimClass -namespace root\cimv2
An instance of a particular class can then be obtained like so (note that -namespace root\cimv2 is not necessary here as it is the default namespace anyway):
PS C:\> get-cimInstance -namespace root\cimv2 -class win32_process

Recursively traversing namespaces

A PowerShell script (that I found here) can be used to show the namespaces:
function get-wmiNamespace {
   param($namespace='ROOT')
   get-wmiObject -namespace $namespace -class __NAMESPACE | forEach-object { (
     $ns='{0}\{1}' -f $_.__NAMESPACE, $_.name)
     get-wminamespace -namespace $ns
   }
}

# $wmiClasses=
get-wminamespace | forEach-object {
  $namespace=$_
  get-wmiObject -namespace $namespace -list | forEach-object {
     $_.path.path
  }
} | sort-object -unique

See also


Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/Windows/...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1759964932, '216.73.216.133', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/Management-Instrumentation/namespaces/index(99): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51