SQL Query to find the detailed Enforcement Status of a Software Update Deployment for Patching.


Please find the query below.

select
vrs.name0,
a.Assignment_UniqueID as DeploymentID,
a.AssignmentName as DeploymentName,
sn.StateName as LastEnforcementState,
assc.StateTime ,
a.CollectionName,
assc.Lasterrorcode
from v_CIAssignment a
join v_AssignmentState_Combined assc on a.AssignmentID=assc.AssignmentID
join v_StateNames sn on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0)
join v_R_System vrs on vrs.ResourceID=assc.ResourceID
where a.AssignmentID="Put the Assignment ID of the deployment"

Comments

Popular posts from this blog

Windows Update prompts for installing an update that has already been installed on the user machine.

Uninstall/Remove/Decommission Secondary Site in SCCM 2012.

Configmgr OnSearchComplete – Failed to end search job Error 0x80244022 WUAHandler.log