#Wait for SCCM client to complete installation $WaitWhileInstalling = -query 'SELECT * FROM CCM_SoftwareUpdate WHERE EvaluationState = 6 or EvaluationState = 7' -namespace 'ROOT\ccm\ClientSDK' -computer $Computer) $updates = -query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK' -computer $Computer) | measure #CCM_SoftwareUpdate #Created by Haavard Molland And for example replace the Deployment Status activity.” in orchestrator. This kind of logic is useful, if you want to do advanced automation of server patching with Configuration Manager and Orchestrator.
I recently created a simple PowerShell script to track the software update installation process initiated by SCCM. WMI queries below will check if all available updates is installed.