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

SCCM: Determining installed applications last use time_ SQL Query.

Unable to read existing WUA Group Policy object. Error = 0x80004005.