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

x
?
Solved

Enable all AD Users in a group with powershell

Posted on 2014-10-01
2
Medium Priority
?
258 Views
Last Modified: 2014-10-01
Hi EE

I dont know where to really start with this , does anyone have a script that will enable all Active Directory users
who are members of a particular AD group ?
0
Comment
Question by:MilesLogan
2 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 2000 total points
ID: 40356012
import-module ac* 
Get-ADGroupMember -Identity <groupname> | select -expa SamAccountName  | % {Enable-ADAccount  -Identity $_ }

Open in new window

0
 
LVL 2

Author Comment

by:MilesLogan
ID: 40356074
too eazy for you ! thank you so much !
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
Loops Section Overview

926 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