Note:- Replace stars (***) with Deployment Unique ID(Example:- {9846A1A8-3289-447C-9CCF-EA41C48EB916})
select vrs.Name0,vrs.Active0, --vrs.AD_Site_Name0,vrs.User_Name0,vrs.Operating_System_Name_and0, a.Assignment_UniqueID as DeploymentID,C.CollectionID,c.Name 'Collection Name', a.AssignmentName as DeploymentName,a.StartTime as Available,a.EnforcementDeadline as Deadline,sn.StateName as LastEnforcementState, wsus.LastErrorCode as 'LasErrorCode',wsus.LastScanTime as 'LastWSUSScan',DateDiff(D, wsus.LastScanTime, GetDate()) as 'LastWSUSScan Age', wks.LastHWScan, DateDiff(D, wks.LastHwScan, GetDate()) as 'LastHWScan Age' 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 join v_GS_WORKSTATION_STATUS wks on wks.ResourceID = assc.ResourceID join v_UpdateScanStatus wsus on wsus.ResourceID = assc.ResourceID LEFT JOIN v_Collection C ON C.CollectionID = a.CollectionID where a.Assignment_UniqueID like '************' and assc.StateType in (300,301) order by 11 desc
0 $type={blogger}:
Post a Comment