rss
twitter
facebook

Home

SCCM Programs used by users in the last 7 days

SELECT DISTINCT DATEDIFF(DAY, rua.lastusedtime0, GETDATE())AS[Days Since Last Used]
,sysvalid.netbios_name0 AS [Computer Name]
,rua.productname0 AS APPLICATION
,rua.filedescription0 AS [File Description]
,rua.explorerfilename0 AS [File Name]
,rua.fileversion0 AS [File Version]
,rua.companyname0 AS publisher
,CASE WHEN ( ISNULL(rua.productcode0, N'') = N'') THEN 'N'ELSE 'Y'END AS [Associated with an Installer]
,rua.lastusedtime0 AS [Time Last Used(GMT)]
,rua.lastusername0 AS [Last Used By]
,rua.TimeStamp
FROM [dbo].v_gs_ccm_recently_used_apps AS rua
                              LEFT JOIN[dbo].v_r_system_valid AS sysvalid ON rua.resourceid = sysvalid.resourceid                       
WHERE lastusername0 Like '%@user%' AND rua.ExplorerFileName0 NOT LIKE '%.tmp' AND rua.fileversion0 NOT LIKE ''
AND  DATEDIFF(DAY, rua.lastusedtime0, GETDATE())<=7

0 comentários:

 
Powered by Blogger