Active Directory · PowerShell

Powershell and Active Directory: Maintains the Leavers of your Company using powershell GUI based Application.

 

HI,

Like every IT Administrator we have to create user accounts when someone joined the company and also delete and reset the account when someone leaves.

From past few days i was trying to write a GUI Application based on powershell.

My Main objective was.

    • Reset Leaving Users Password.
    • Remove him from all groups.
    • Move his user account to particular OU

You can download the script form this link : http://gallery.technet.microsoft.com/scriptcenter/Manage-Leavers-accounts-in-b98d0df2

Before running this script please change this variable as per your need:  $ArchiveOu=‘OU=Archived,DC=localDC,DC=com’

Let me explain about the script.

This script is based on ActiveDirectory Module , so before running the script make sure that you have installed RSAT tools.

When you run the script first it ask for username  and password, Please provide your Domain Admin username and password.

02-08-2012 12-06-23

After you provide the credentials a GUI will open.

On the Number 1 , it is showing that if script is able to detect and imported the ActiveDirectory Module.

Our first task to to find the Users SAMAccount Name.

So provide the users First and last name (2,3) and click on Find (4)

when you click on Find .. It search for user in all AD for matching user.

in number 5 this will show the users SAMAccount Name

in Number 6 Provide a new password for user.

Now on number 7 click on Starts

When you click on start it do .

  • Reset User password
  • remove it from all Groups
  • Move it to a particular OU

 

02-08-2012 12-04-54

You can download the script form this link : http://gallery.technet.microsoft.com/scriptcenter/Manage-Leavers-accounts-in-b98d0df2

Thanks for reading.

Thanks!

Aman Dhally

Buy-More-Twitter-Followers 4fb29548b6adc  linkedin

00488d3a

2 thoughts on “Powershell and Active Directory: Maintains the Leavers of your Company using powershell GUI based Application.

Comments are closed.