Powershell code to view the FSMO role and AD Sites across the Active Directory domain


Can anyone here please assist me with the PowerShell code that I can execute to get the AD Sites name and FSMO role for all of the Domain Controller/Global Catalog in my AD Domain ?

My AD Domain functionality is still Windows Server 2003 with some AD/DC is still running on WIndows Server 2003 physical box to be decommissioned.

Senior IT System EngineerIT ProfessionalAsked:
Who is Participating?
Dan McFaddenConnect With a Mentor Systems EngineerCommented:
Using NETDOM from command line:

netdom query /domain:YourDomainGoes.Here fsmo

Using Powershell (its 2 separate commands):

1. Get-ADForest YourDomainGoes.Here | ft SchemaMaster, DomainNamingMaster
2. Get-ADDomain YourDomainGoes.Here | ft PDCEmulator ,RIDMaster, InfrastructureMaster

Senior IT System EngineerIT ProfessionalAuthor Commented:
ok, as for the NetDom, do I have to run that on the Domain Controllers or it can run on my WIndows 7 laptop ?
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Dan McFaddenSystems EngineerCommented:
You can run it from your laptop in you have RSAT (AD remote administrator tools) installed.
Dan McFaddenSystems EngineerCommented:
Dan McFaddenSystems EngineerCommented:
RSAT is Remote Server Administrator Tools... made a mistake in the name in my above post.
Senior IT System EngineerIT ProfessionalAuthor Commented:
Thanks !
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.