Jump to content


Sign in to follow this  
polonio210

Query to return Computers with specifics files (With Serial Number and User Logged On)

Recommended Posts

Hello everyone,

 

I'm new on the community, sorry for my bad English, im still learning yet. Recently i'm working with Asset Management department in a company that have almost 3000 devices, if someone have some tips in this area i appreciate.

 

I need to create a report to return all computers that have a specific file (eg. winword.exe). I already have an query, but i'm dont know to include in the following query information's about SerialNumber and the user current logged on. Someone can help me?

 

Select DISTINCT
SYS.Netbios_Name0 [Hostname],
SF.FileName [File Name],
SF.FileDescription [File Description],
SF.FileVersion [File Version],
SF.FileSize [File Size],
SF.FileModifiedDate [File Modified Date],
SF.FilePath [File Path]
From v_GS_SoftwareFile SF
join v_R_System_Valid SYS on SYS.ResourceID = SF.ResourceID
join v_FullCollectionMembership FCM on SYS.ResourceID = FCM.ResourceID
join v_Collection COL on FCM.CollectionID = COL.CollectionID
Where
SYS.Operating_System_Name_and0 like '%Workstation%' and -- Retirar todas as maquinas server
SF.FilePath not like '%Recycle%' and -- Retirar todos os recycles (lixeira)
SF.FileName LIKE '%winword%.exe'

 

 

Share this post


Link to post
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...