Possible to integrate RefreshServerComplianceState

Is it possible to integrate the following:
Can you implement in the client actions on a collection or a client, the command is written below.
Can you then open a window to show the state like the window when you press the «machine policy….»

(New-Object -ComObject Microsoft.CCM.UpdatesStore).RefreshServerComplianceState()


Name: Refresh Compliance State

thank you

Thanks for the suggestion, this seems like it would be very useful.

I would suggest you take a look at Collection Commander by Roger Zander. It is extensible, you can add whatever PowerShell code you want to run on a collection. I just added refreshservercompliancestate to my script repository for Collection Commander and it works! I checked UpdatesStore.log and saw the refresh happen. Just add this line to a ps1 file: (New-Object -ComObject Microsoft.CCM.UpdatesStore).RefreshServerComplianceState() | out-null; “RefreshComplianceState”