Scan errors

 select distinct sys.name0 [Computer Name],

os.caption0 [OS],

convert(nvarchar(26),ws.lasthwscan,100) as [LastHWScan],

convert(nvarchar(26),sys.Last_Logon_Timestamp0,100) [Last Loggedon time Stamp],

sys.user_name0 [Last User Name] ,

uss.lasterrorcode,

uss.lastscanpackagelocation

from v_r_system sys

left join v_gs_operating_system os on os.resourceid=sys.resourceid

left join v_GS_WORKSTATION_STATUS ws on ws.resourceid=sys.resourceid

left join v_updatescanstatus uss on uss.ResourceId=sys.ResourceID

left join v_FullCollectionMembership col on sys.ResourceID=col.ResourceID

where uss.lasterrorcode!='0'

--and DATEDIFF(dd,ws.lasthwscan,GetDate()) <1

and col.CollectionID = 'BEL00021'

order by sys.name0

Comments

Popular posts from this blog

powershell script to export applications and its requirement in weird way

get-allrecent udpated logs

TASK sequence duration report