Avatar of Mike Dias
Mike Dias
 asked on

Powershell - Batch Update AD User Object > Member Of Tab

I have over 80 users that I need to update their "Member Of" field in their AD User Object > Member Of Tab

I have two GPOs to add, possibly three.

The users are in a txt and CSV file.

Is there a PS script that will process the update?
Powershell

Avatar of undefined
Last Comment
Mike Dias

8/22/2022 - Mon
Qlemo

Import-Csv GroupMembers.csv | % { Add-ADGroupMember $_.Group -Member $_.User }

Open in new window

If the csv fle has rhe columns Group and User, and only a single user per row.
Mike Dias

ASKER
Thanks for this. I'll try this tomorrow.
ASKER CERTIFIED SOLUTION
Mike Dias

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike Dias

ASKER
Script based and solves the issue.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck