# 3. Using Classes ``` # Exploring Namespaces ### We can list all namespaces by querying the _Namespace class. Use below command to execute to list all namespaces within the root namespace. Get-WmiObject -Namespace "root" -Class "__Namespace" | select Name Get-CimInstance -Namespace "root" -ClassName "__Namespace" ``` ![](https://i.imgur.com/FGXOACB.png) ``` ### Lets use Get-WmiNamespace to list even the nested namespaces ### See Get-WmiNamespace.ps1 ``` ![](https://i.imgur.com/9diS9dm.png) ## Exploring Classes - Process, hardware, services, etc - Classes are divided into three categories: Core Classes Common Classes Extended Classes - Classes are further divided into these types: Abstract Static Dynamic Association ``` Get-WmiObject -Class *bios* -List ``` ![](https://i.imgur.com/bbY0J6L.png) ``` Get-WmiObject -Namespace root\cimv2 -Class *bios* -List ``` ![](https://i.imgur.com/v9Wrh98.png) ``` Get-CimClass -ClassName *bios* ``` ![](https://i.imgur.com/lhd7VFc.png) ``` To list only dynamic classes (only dynamic classes can be queried) Get-CimClass -QualifierName dynamic ```