FSMO Roles stands for flexible single master operations. FSMO prevents a conflict in an Active Directory updates from occurring. Currently, in windows, there are five FSMO roles, these roles can be transferred to any other DC in domain or forest. Using NetDom query and PowerShell, you can find FSMO roles holders in an Active Directory.
Active Directory extends the single-master model to include multiple roles and the ability to transfer roles to any DC. Currently, in Windows, there are five FSMO roles are as given below:
- Schema master
- Domain Name master
- RID master
- PDS emulator
- Infrastructure master
In this article, I will explain how to find FSMO roles using the Netdom query tool and PowerShell.
Let’s understand with example to check FSMO roles and get a list of FSMO roles in an Active Directory.
Netdom Query FSMO to get FSMO Roles
Netdom is a command-line tool that allows Windows domains and trust relationship management in Active Directory.
You can use Netdom query FSMO to get a list of FSMO roles in an Active Directory as given below
netdom query FSMO
Open command prompt (CMD) to run netdom query FSMO command, it will find FSMO roles in Active Directory and retrieve the list below
The above netdom query FSMO command gets roles and DC name they belong to.
Using PowerShell to get FSMO Roles
You can use PowerShell to find FSMO roles in an Active Directory using Get-AdForest cmdlet to get Schema master and Domain Name master roles. and using Get-AdDomain cmdlet to get PDCEmulator, RIDMaster, InfrastructureMaster roles.
Let’s find FSMO roles in an Active Directory forest using the below command
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
Get-AdForest command gets Domain name master and schema master FSMO roles in active directory forest.
To get domain FSMO roles, use the below command
Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator
Get-AdDomain command gets domain FSMO roles like RID master, PCD emulator, and Infrastructure master.
The output of the above commands is given below
Cool Tip: How to use get-adprincipalgroupmembership in Active Directory!
I hope the above article to find FSMO roles is helpful to you to get a list of FSMO roles in an Active Directory.
Netdom query tools and PowerShell cmdlets like Get-AdForest, Get-AdDomain are used to find FSMO roles and which domain controller they are in.
AD Benefits: Read more to know Active Directory advantages and disadvantages!
You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.