Get FSMO Roles in domain with Powershell

  Active Directory, Powershell, Windows

First, fire up a PowerShell windows with the Active Directory module. If you have the Admins tools installed, it should be called “Active Directory Module for Windows PowerShell”
If you don’t have the admin tools install, you must install them, or log on a server that has them, like a Domain Controler.

If you do have the Active Directory module installed, but opened a regular PowerShell window, import the module with this command:

Import-module ActiveDirectory

Then run this to get the FSMO roles owners, replacing “MyDomain.net” with your own domain.

$Domain = 'MyDomain.net'
Get-ADForest $Domain | Format-Table SchemaMaster,DomainNamingMaster
Get-ADDomain $Domain | format-table PDCEmulator,RIDMaster,InfrastructureMaster


Leave a comment