Hi Piotr Lapkowski
On the Client or a Server with CMClient installed the main Namespaces are root\ccm - recursive and root\cimv2\sms.
On the SiteServer it is root\sms - recursive
On a DistributionPoints we have also one additional Namespace root\sccmdp
You can find more information here about the WMI-Namespaces:
WMI namespaces and classes for reports - Configuration Manager | Microsoft Learn
For WMI-Classes and Methods you will find information here:
Configuration Manager API reference | Microsoft Learn
The association between Classes is not that documented - it will be necessary to look at the WMI-Classes and Props in that case when you start your Code-Project.
But here is another example - at the moment we have an open Bug regarding the CmdLet Set-CMDriverBootImage. The Problem instead of applying one specific Driver it is adding Drivers of a Package because of a wrong Query-Expression.
So the workaround was a native WMI-Call.
# Get the DriverDeatils we need
$DriverInfo = Get-WmiObject -Namespace root\sms\site_fox -Query "select CI_ID, ContentSourcePath from SMS_Driver where CI_ID = '16784127'"
# Build a Reference Instance to apply Props later to the Instance
$DriverObj = [WMIClass]'root\sms\site_fox:SMS_Driver_Details'
$newDriverObj = $DriverObj.CreateInstance()
$newDriverObj.ID = $DriverInfo.CI_ID
$newDriverObj.SourcePath = $DriverInfo.ContentSourcePath
# Get the BootImage WMI-Object - Load Lazy Properties extend the existing DriverReference-Array
$objWMI = [WMI]'root\sms\site_fox:SMS_BootImagePackage.PackageID="FOX00005"'
$objWMI.Get()
$objWMI.ReferencedDrivers += $newDriverObj
$objWMI.Put()
Hope this helps.