Solved

Script to import login IDs to an AD group.

Posted on 2014-11-05
3
48 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

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 …
In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
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.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now