Wednesday, May 9, 2012

Powershell and Active Directory: Find Active Directory Replication Servers using Powershell.



Today my IT manager give me the task to find and create the list of all "Active Directory Replication Server". First i was thought to find it using "Active Directory Sites and services" then i thought lets try to find it using PowerShell our favourite tool.

i use Get-ADDomain tool cmdlet to find the list of Replicated server.

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

Now Import the Active Directory module.

Import-Module ActiveDirectory

30-04-2012 23-21-03 

Lets run the Get-ADDomain cmdlet

It shows a lot of information regarding your current domain.  Like Forest, Child Domains, Parent Domain etc., but we are interested in "ReplicaDirectoryServers"

09-05-2012 12-56-27

we have to use Dot(.) notation to show the list of all servers in "ReplicaDirectoryServers"  property.


Finally, now we have the list of all of our "ReplicaDirectoryServers" ..

09-05-2012 12-59-05 

Thanks for reading ..

Hope it may help someone...

Aman DhallY