Hi all,
I have a list of sAMaccountNames and am trying to figure out if from that list any of the user objects are members of a set of security groups.
There are two apps that have sets of groups assigning permissions. I want to find out if anyone in this list is provisioned for either app at any level. Here is what I have so far:
$users = Get-Content c:\Users\hcsjcl\Desktop\list.csv ForEach($user in $users){ $object = Get-QADUser $user $groups = Get-QADMemberOf $object if($groups -match 'App1'){ } if($groups -match 'App2'){ } }
I have tried capturing the result of the regex but havent had any luck. If I try and output $matches I get null array errors. Am I approaching this right?