Me and a colleague are trying to figure out a way we could view the status of each configuration item in a configuration baseline deployed to a PC. We are trying to develop a custom tool using powershell that will show if a machine is compliant for a specific baseline. If it isn't we want to be able to see which configurations items are the problem. Here is a very basic abstract example of our posh code.
$ClientComputer = $env:COMPUTERNAME $Baselines = Get-WmiObject -ComputerName $ClientComputer -Namespace 'root\ccm\dcm' -Class SMS_DesiredConfiguration ForEach($b in $Baselines) { Write-Host $b.DisplayName "last status =" $b.LastComplianceStatus "on date" $b.LastEvalTime }
The real thing is incorported into a listview etc. This just shows the concept. I have fired up wbem and can see a mthod in the SMS_DesiredConfiguration class called GetUserReport, can anyone tell me if this method does what it says on the tin and what parameters it needs? Documentation for this is hard to come by.
Thanks