Showing posts with label New-ADGroup. Show all posts
Showing posts with label New-ADGroup. Show all posts

Thursday, August 2, 2012

Powershell and Active Directory: Powershell based GUI Application to create Group in AD.

Hi,

GUI are for dumbs and for lazy likes me or for beginners. Few days ago a new IT guy joined our company, he is kind of fresher. I first which we gave him is to create few Groups in active directory. He is new so i don’t want him to sit on any live server or mess with “Active Directory Users and Computers Console”, for him i wrote a little bit tiny tiny powershell based GUI app.

You can download the script from here : https://dl.dropbox.com/u/17858935/Create_Groups_in_AD_Community.zip

This Script is based on Active Directory module, so before running this script make sure you have RSAT tools installed.

When you run the script first time , it ask you for Username and password, please provide your domain administrator credentials.

02-08-2012 12-06-23

After providing the credentials a GUI will open.

On the Top of the GUI i added a little bit of information about the presence of “Active Directory Module”, and if the Module found is equal to “NO” then this GUI wont work.

In Group Name : Provide the desired group name which you want to create.

In Description : Provide a little bit information about the Group.

In Group Scope: Select your desired Group Scope.

In OU: Select the OU location of The Group.

In Server: Choose your nearest domain controller.

02-08-2012 21-16-38

Your final screen will be look like below. and now click on create.

02-08-2012 21-17-05

That’s all, Our Group is created successfully.

02-08-2012 21-18-12

Download Link : https://dl.dropbox.com/u/17858935/Create_Groups_in_AD_Community.zip

Thanks

Aman Dhally

Thanks for reading.

Thanks!

Aman Dhally

Buy-More-Twitter-Followers 4fb29548b6adc linkedin

nala_what

Monday, June 11, 2012

Powershell and Active Directory: Powershell Script to create multiple groups in Active Directory and add predefined users in to it.


HI,

Sometime a need arrives when you need to create a few Active Directory groups and add the same members to all the groups.

Today i need to create 20 Group and need to add same users to all the groups. To create 20 Group manually and then add users to it one by one is a hectic job for me .

So again i thought let do it with PowerShell.

To achieve my goal i wrote a simple Powershell script. Make sure before running the script Make sure you have "RSAT" installed and imported the "Active Directory" Module.

You can download the script from : http://gallery.technet.microsoft.com/scriptcenter/Create-Multiple-Groups-in-4118c589

Screenshots
In testing OU i have only one Group Now.

11-06-2012 16-19-22

Run the script now and it ask you for Domain Administrator username and password.

11-06-2012 16-20-59

Ok...Script is finished with some Messages :)

11-06-2012 16-31-39

lets check our OU  and it has 4 New Groups.

11-06-2012 16-33-02

Lets Check inside the groups.

11-06-2012 16-33-15 11-06-2012 16-33-28 11-06-2012 16-33-46 11-06-2012 16-34-00 

All is well and done as per our requirements.

You can download the script from : http://gallery.technet.microsoft.com/scriptcenter/Create-Multiple-Groups-in-4118c589

Thanks!
Aman Dhally
Buy-More-Twitter-Followers   4fb29548b6adc
avatar-207

Wednesday, June 6, 2012

Powershell and Active Directory: Create a new group in Active Directory using Powershell.

 

Hi,

Yesterday one of my users asked me to create a few user group for him. Normally to create a new group i open "DSA.MSC" or "Active Directory users and computers" and create a desired group. This time i thought i would create a new group using PowerShell.

To create a new group in Active Directory make sure you have RSAT installed.

Lets Start.

 Make sure you have "RSAT" installed on you laptop.

Now Import the Active Directory module.

Import-Module ActiveDirectory

30-04-2012 23-21-03 

..

ok, Module is imported,,

we are going to use "New-ADGroup" cmdlet.

I want a group Name to be  "Singers", i my OU "Testing", the Group category in my case is "Security" and the Group Scope is "Global". I choose a -Server parameter because my main DC in located outside of Delhi and then using -Credential we are providing domain administrator username and password becasue you need administrator privileges to create a group in Active Directory.

The command should be like below.

New-ADGroup -Path "OU=testing,DC=localdc,DC=com" -Name "Singers" -GroupCategory Security -GroupScope Global -Server "local-dc" -Credential localdomain\administrator

After run the Command it is asking for Domain Administrator Credentials. Provide them.

06-06-2012 12-07-24 

Ok. Command run successfully without errors.

06-06-2012 12-08-24 

Let's check out OU "testing" and see if this group is created there.

Bingo.. all Done :)

06-06-2012 12-08-46 

 

Thanks for reading.

Thanks

Aman Dhally

Buy-More-Twitter-Followers

spiderman_jump