Find the site name and users names for group of computers

Hi we have got SCCM 2012 R2 SP1 in our environment. I was given a task to find the computers for which a particular app deployment failed. Using the built in reports I have got list of computer names in excel sheet, I want to find out the user names associated with those computers and also find the AD site name. Is there any script that is available for thi

September 4th, 2015 1:45am

Not that I am aware of, but you could copy the SRS report and add the columns needed. 
Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 2:19am

I did not get your answer. What do you mean by add the coloumns ?.
September 4th, 2015 2:24am

Try this :-

Select Distinct
 sys.Netbios_Name0,
 sys.User_Domain0,
 sys.User_Name0,
 sys.AD_Site_Name0,

 FROM
 v_R_System sys
 JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
 WHERE
 sys.ResourceID not in (select sys.ResourceID
 from
 v_R_System sys
 JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
 where
 DisplayName0 like '%appname%'
and Version0 like 'version')
and sys.Operating_System_Name_and0 like '%worksta

Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 2:53am

@Prajwal - It worked perfect. Thank you.
September 4th, 2015 3:33am

Okay one more question, this query tells us the app that is not installed, how to check app installed ?.
Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 3:34am

In the same query you need to remove "not"

sys.ResourceID not in (select sys.ResourceID

to

sys.ResourceID in (select sys.ResourceID

September 4th, 2015 4:29am

Worked. Thank you.
Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 4:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics