# Get the Domain Level Roles
Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator
# Get the Forest Level Roles
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
Details
Return all the domain and forest level FSMO roles.

Example
PS C:\> Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator
>> Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster

InfrastructureMaster                 RIDMaster                            PDCEmulator
--------------------                 ---------                            -----------
DC01.contoso.com                     DC01.contoso.com                     DC01.contoso.com


DomainNamingMaster                     SchemaMaster
------------------                     ------------
DC01.contoso.com                        DC01.contoso.com