Solved

Script to import login IDs to an AD group.

Posted on 2014-11-05
3
46 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
Comment Utility
Get-Content <textfilename> | Add-ADGroupMember <groupname> -Members $_

Open in new window

0
 

Author Comment

by:nav2567
Comment Utility
Sorry, just tried but not working.
0
 
LVL 16

Expert Comment

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

login1
login2
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
A procedure for exporting installed hotfix details of remote computers using powershell
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

11 Experts available now in Live!

Get 1:1 Help Now