Thursday, 3 October 2019

SCCM - SQL Query_Update Deployment Status using AssignmentID

SCCM - SQL Query_Update Deployment Status using AssignmentID

select

vrs.name0 as machineName,

vrs.AD_site_Name0 as ADSiteName,

vrs.User_Name0 as UserName,

a.Assignment_UniqueID as DeploymentID,

a.AssignmentName as DeploymentName,

sn.StateName as LastEnforcementState,

assc.StateTime asStatusTime,

assc.LastErrorCode as 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 in (xxxxxxxx)


order by DeploymentName

SCCM SQL Query Online device by Management Point

 SCCM SQL Query Online device by Management Point select srl.SiteCode, srl.ServerName, srl.InternetEnabled, srl.Shared, srl.SslState, SUM(br...