AD Management Using Power Shell

AD users list generate & Export using PowerShell in windows2008R2, Windows 2012 Domain

Import Active Directory Module to ADPowerShell:

AD PowerShell module is installed by default on a DC.

To make sure that you have the Active Directory module available for import, you can run the following command in Windows PowerShell console.
Get-Module –ListAvailable 


Open PowerShell console and load the Active Directory module with

Cmdlet Import-Module ActiveDirectory

Featured image

After import ActiveDirectory Module

To get all user objects in Active Directory  Get-ADuser  –Filter  *

Get-ADuser –Filter  | Export-Csv c:\Aduserslist .csv         

 Featured image

To export ad users list to c:\ drive filename given as Aduserslist.csv  (it can be any name)

It can open with Microsoft Excel

To get specific OU users List:

Ex: To get the marketing users list

Get-ADuser -Filter * -SearchBase “OU=Marketing, DC=abc,DC=com”Featured image

To export CSV.

Get-ADuser -Filter * -SearchBase “OU=Marketing, DC=abc,DC=com” | Export-Csv c:\Marketing.csv


 To get specific sub OU / child OU users List:


 Get-ADuser -Filter * -SearchBase “OU=Branch,OU=sales,OU=abc,DC=abc,DC=com” | Export-Csv c:\Marketing.csv

To get the report of sub OU under child OU the reverse hierarchical structure has to be follow    …

Referring to the following command

Get-ADuser -Filter * -SearchBase “OU=OU=Branch,OU=sales,OU=abc,DC=abc,DC=com”


i.e     first we  select the OU which report we are generating (EX: BRANCH), then select the upper level OU child OU (Ex: SALES)

then Parent OU (Ex: ABC)

Windows Activation Deactivatio

SLMGR (windows deactivation)

Uninstall Windows Product key

Windows Software License Management Tool  (SLMGR)

CMD – enter


U’ll get the reply  “uninstalled product key successfully” as follows


Format the PC  — then re activate the license..

For more Options



All the Best

Windows 2012 Hyper-V

Windows2012 R2 Cli Installing GUI features offline

After installation of windows 2012 R2 Core server the screen appears like…

Initially create a Directory in C: drive…. Name it as Image (or any)


Dump the windows image to it… using the following command

D: is the DVD rom Drive with Windows 2012R2 Disk

Copying files to C:\Image folder

After copy Completes… ( no need to restart)

type following command to install GUI features to core server

The Windows features installation starts…

After complete the Installation the server will ask to reboot… say yes to re boot…

After reboot system updates files – then starts in GUI… windows 2012 R2


Windows 2012 Hyper-V

Windows2012 R2 Cli Installing GUI features Online

Switch between Server Core to Server GUI in Windows Server 2012 – ONLINE

Click the following link… and download


Extract files and copy contents to USB drive..

Connect the USB drive to the core server…Switch GUI Server

Default the command prompt appears…

After installation of windows 2012 R2 Core server the screen appears like…

To connect power shell from command prompt type c:/powershell (press enter)

List the files in USB …. ( E is my USB drive…. Access Usb by e: then enter)

PS E:\cd SwitchGUIServerCORE (enter)

PS E:\SwitchGUIServerCORE> .\SwitchGUIServerCORE.ps1 (enter to run the PS script)

Select the option (3) to install GUI from online resources

The installation starts –

after complete the installation reboot to boot with GUI… say Y to yes



Windows 2012 Hyper-V

RoboCopy Step By Step CLI and GUI

Robocopy CLI

Robocopy step by step (Robust Copier CLI Tool User Guide)

Microsoft Robocopy GUI

Microsoft Robocopy GUI requires one of the operating systems Windows XP/2000 Pro/Server 2003/Vista/2000 Server/Server 2008/7/8/Server 2012 to be running on the computer it will be installed on. The download file has a size of 1MB.

to download click the following link!ACkSyYJhLPSNayY