troubleshooting Question

Powershell - Group membership with mapping table

Avatar of alohadin
alohadin asked on
PowershellSecurity
8 Comments1 Solution135 ViewsLast Modified:
Hi,

I have a list of users that need to be added to a a security group in AD depending on some kind of mapping table.

Mapping table example:

Gender, Department, Security Group
M, HR, Group 1
F, HR, Group2
M, Finance, Group 3
F, Finance, Group 4
etc...

Note: This is just an example

So I have a list of users where I can read the gender en department from the object and I need to add them to a corresponding group according to the mapping table.
If this mapping table is changed, the group membership should changed dinamically.

What would be the easiest approach fir this?
I don't like to have a lot of if statements as the mapping table is very big.

Thanks
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros