Hi Guys,
I am trying to write a quick script to see if a user belongs to an AD group.
#This line imports a csv file, which contains the following
| Name | ||
| GRP AC HPOO Test | ||
| SGG-SF-Infrastructure-W_ACC | ||
$groups = import-csv H:\Scripts\input\dan.csv##
This line gets a list of all groups the account ellisd belongs to
$accounts = Get-ADPrincipalGroupMembership "ellisd" | select name
What I now want to do is run the list of $groups over the list of $accounts, and if a match is found, output true .
Can someone please help with this
Dan