Query SCCM Baselines using WMI

To get list of all baselines assigned to the computer:

Open PowerShell with elevated privilege and run below command:

 
 

Get-WmiObject -Namespace root\ccm\dcm -class SMS_DesiredConfiguration | Select-Object -Property DisplayName | Sort-Object -Property DisplayName

 
 

 

To Trigger evaluation of one specific baseline:

e.g., you want to trigger a baseline that evaluates Hybrid Azure Join status

 
 

$Name = Hybrid Azure Join

 
 

([wmiclass]”root\ccm\dcm:SMS_DesiredConfiguration”).TriggerEvaluation(((Get-WmiObject -Namespace root\ccm\dcm -class SMS_DesiredConfiguration | Where-Object {$_.DisplayName -eq $Name}).Name), ((Get-WmiObject -Namespace root\ccm\dcm -class SMS_DesiredConfiguration | Where-Object {$_.DisplayName -eq $Name}).Version))