Video Screencast Help

How can I target the computers where the primary user is in a specific department?

Created: 08 Oct 2010 | 4 comments

Just as the title says...

For some software deployment, I need to target the machines where the machine's primary user is in a specific department.  I can see all the user department information under Resources, but am not sure how to pull PCs from that.

Discussion Filed Under:

Comments 4 CommentsJump to latest comment

jharings's picture

You would need to determine that, and then setup a resource association between computers and departments. Or even users and departments. With the primary user, the PC to User association is already established, so you need to 'complete the circle'.

Jim Harings
HP Enterprise Services
1st Rule of Connect Club: Mark the post that helped you the most as a 'solution'. 2nd Rule of Connect Club:You must talk about Connect club.

bsakata's picture

Hi Zac,

You can try creating a sql based filter by joining the dbo.vuser and dbo.Inv_AeX_AC_Primary_User.  The only thing not sure if user is the same as name in the two tables...  i.e.

select a1._ResourceGuid, from (select name, domain from dbo.vuser where department like 'departmentname') aduser

JOIN dbo.Inv_AeX_AC_Primary_User a1 on = a1.[user]

JOIN dbo.vitem i on a1._ResourceGuid = i.guid

WHERE a1.[Month] = datename(month,dateadd(mm,0,getdate()))

Brent Sakata
mindSHIFT Technologies

Zac H's picture

Wow.  That's awesome.  I'll try that on Monday.  Some day I'll get my head wrapped around SQL queries...