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
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.
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
Download Link : http://gallery.technet.microsoft.com/scriptcenter/Manage-Leavers-accounts-in-b98d0df2
Thanks for reading.