I am a scripting novice. I am working to improve my skills in PowerShell but am stumped on this one, which isn't hard to do.
Everyday a spreadsheet is created with of users that have completed a certain action, and need to be added to one of 3 AD groups that already have several hundred existing members in each group. I change the spreadsheet to a *.csv for use with PowerShell. There is a $_.EmployeeID column of employee ID numbers which are also the SamAccountNames of the users. These users could be members of any of 4 domains in the AD forest. It is also possible that the users are already a member of one of the 3 groups in question. The 3 groups are all in the same OU of one of the domains.
I'm trying to use PowerShell to check the EmployeeIDs against the three groups and flag\list\display\export a list of the Employee IDs that do not belong to any of the 3 groups.
Adding the users to one of the groups is out of scope for this question because of cases that decide which group the need to be in. I also have the Quest AD module for PowerShell if needed.