I need to create a software filter that will look a users AD group and based upon having certain Security Groups it will install software from a quick deploy job.
I am not a DBA so if any answers or examples a minimal explanation of what does what would be great.
I think I got this from the forum but can't find it to link to.
Filter contains the computer resource where the AD login id is a member of the named global group:
from Inv_Global_User_General_Details UG
Join Inv_Global_Windows_Users GW on GW._ResourceGUID = UG._ResourceGUID
join dbo.[Inv_Security_Groups] SG on SG.[_ResourceGuid] = UG.[_ResourceGUID]
AND SG.[Group Name] = N'CN=Dev,OU=Groups,DC=google,DC=com'
join vComputer vcom on vCom.[User] = GW.[userid]
NB! the 'Inv_Security_Groups' table contains upper case values (in 'Group Name' column), so the statement above will not work on case-sensetive SQL.
Use it like this:
AND SG.[Group Name] = N'CN=DEV,OU=GROUPS,DC=GOOGLE,DC=COM'
ps. also, the column size is limited to 255 characters, so if the OU/Group is really long in AD, there will be only 255 first symbols out of it.
I had to put a ticket in with Symantec we missed importing users with security groups and this is why the dbo.SecurityGroup failed to populate with any data. Thanks for the help.