Get FSMO Roles

cmd

netdom query FSMO

PowerShell

Get-ADForest contoso.com| ft DomainNamingMaster, SchemaMaster
Get-ADDomain contoso.com | ft InfrastructureMaster, PDCEmulator, RIDMaster