Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script to import login IDs to an AD group.

Posted on 2014-11-05
3
Medium Priority
?
56 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Loops Section Overview
Screencast - Getting to Know the Pipeline

886 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