PowerTip: Use PowerShell to Get List of FSMO Role Holders

Doctor Scripto

Summary: Use Windows PowerShell to get a list of FSMO role holders in Active Directory.

Hey, Scripting Guy! Question I use NETDOM QUERY FSMO to list my domain controllers that hold the FSMO roles, but can I do it with Windows PowerShell?

Hey, Scripting Guy! Answer As usual, there is more than one way to do most things in Windows PowerShell, but here are some syntax examples to meet your needs:

Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator

Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster

Get-ADDomainController -Filter * |

     Select-Object Name, Domain, Forest, OperationMasterRoles |

     Where-Object {$_.OperationMasterRoles} |

     Format-Table -AutoSize


1 comment

Discussion is closed. Login to edit/delete existing comments.

  • andrew gauger 0

    Just a reminder, in case you get The term ‘Get-ADDomain’ is not recognized as the name of a cmdlet, you can execute this:
    import-module activedirectory

Feedback usabilla icon