Script to import login IDs to an AD group.

Can someone advise a PS script to read a text file of login IDs and import them into an AD group?
nav2567Asked:
Who is Participating?
 
Rajitha ChimmaniCommented:
Get-Content <textfilename> | Add-ADGroupMember <groupname> -Members $_

Open in new window

0
 
nav2567Author Commented:
Sorry, just tried but not working.
0
 
Rajitha ChimmaniCommented:
What happens when you try?The txt file should have the entries on each line as below

login1
login2
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.