0

Any SCCM experts out there, can help on what I am doing wrong. I am trying (via PowerShell) to get a list of devices that are not compliant. We have a PowerShell script setup which performs the compliance check on the clients. And within the GUI, I can see the list of compliant and non compliant client device names.

I am struggling to get a list of these devices though via powershell. I can see the total number non-compliant, but see no way to export the list of the devices names themselves.

So this works to get the count of devices compliant for example, but how do I get a list of the device names themselves? Am Totally Stumped..

Get-CMBaseline -Id 17551554 | Get-CMBaselineDeployment  | Get-CMBaselineDeploymentStatus -StatusType NonCompliant

Thanks in advance, and appreciate the help.

1 Answers1

0

Ran into your post which helped me realize my error. However your part I solved for applications a long time ago (so use it there too, just change the select statement :)).

Just add | Get-CmDeploymentStatusDetails | Select assetname

You'll get your devices.

DanielJ
  • 729
  • 2
  • 7
  • 26
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 09 '22 at 12:43