Report FSMO role holders
Documentation: Microsoft Learn
Find all five FSMO role holders with Get-ADForest and Get-ADDomain. Read the forest-wide and domain-specific role properties separately.
The script
Script reader
Inspect before you run
Inspect the script below. It does not run in this browser.
Inspection only — no command has run.
Show reference output
Inspect this example’s structure
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Get-ADForest | Select-Object SchemaMaster,DomainNamingMaster; Get-ADDomain | Select-Object PDCEmulator,RIDMaster,InfrastructureMaster- Stage 1Get-ADForest
Positional values or no named parameters - Stage 2Select-Object
Positional values or no named parameters - Stage 3Select-Object
Positional values or no named parameters
How it works
Two statements run in sequence. Get-ADForest exposes the forest-wide roles through its SchemaMaster and DomainNamingMaster properties, and Get-ADDomain carries the domain-level roles under PDCEmulator, RIDMaster and InfrastructureMaster. Each Select-Object just reads those properties off the returned object.
Adapting it
Assemble a single row instead of two output blocks by wrapping both calls inside one [pscustomobject] literal, which is far easier to file in a runbook or diff against last month's capture.
Requirements
ActiveDirectory module.
If the result is unexpected
FSMO role owners differ from an old report.
Roles may have transferred, or the query may be reading a different domain or forest.
- Check the domain and forest context and compare the returned role owners with current directory administration records.
Validate the result
Each of the five role values resolves to the expected directory server.
Keep the check reliable
Include forest, domain and collection time in role-owner reports.