Solved

Script to import login IDs to an AD group.

Posted on 2014-11-05
3
49 Views
Last Modified: 2014-11-20
Can someone advise a PS script to read a text file of login IDs and import them into an AD group?
0
Comment
Question by:nav2567
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Rajitha Chimmani earned 500 total points
ID: 40424691
Get-Content <textfilename> | Add-ADGroupMember <groupname> -Members $_

Open in new window

0
 

Author Comment

by:nav2567
ID: 40429114
Sorry, just tried but not working.
0
 
LVL 16

Expert Comment

by:Rajitha Chimmani
ID: 40429314
What happens when you try?The txt file should have the entries on each line as below

login1
login2
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question