Sunday, May 18, 2014

SQL Query To Find Machines In A Specified Collection Having A Specified Application Installed

SQL  :



Select

SD.Name0 'Machine Name',

SD.Resource_Domain_OR_Workgr0 'Resource Domain',

SD.User_Name0 'Login ID',

SD.User_Domain0 'Account Domain',

USR.Full_User_Name0 'Full Name',

ARP.DisplayName0 'Display Name'

From v_R_System SD

Join v_FullCollectionMembership FCM on SD.ResourceID = FCM.ResourceID

Join v_Collection CN on FCM.CollectionID = CN.CollectionID

Join v_R_User USR on SD.User_Name0 = USR.User_Name0

Join v_Add_Remove_Programs ARP on SD.ResourceID = ARP.ResourceID

Where CN.Name = 'All Systems'

And ARP.DisplayName0 Like '%Your program name like outlook%'

No comments:

Post a Comment