4

#PSTip Discovering Active Directory FSMO Role Holders using PowerShell

Note: This tip requires PowerShell 2.0 or above.

Active Directory defines five FSMO roles:

  • Schema master
  • Domain naming master
  • RID master
  • PDC master
  • Infrastructure master

The first two: schema master and the domain naming master are per-forest roles. There can be only one of each per forest. The other three: RID master, PDC master, and the infrastructure master are per-domain roles. Each domain has its own RID master, PDC master, and infrastructure master.

There are numerous ways and tools to help you get the information, including the PowerShell AD module. With the following code, you can get the forest and domain role holders of the  current user using PowerShell only.

[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() | Select-Object *owner
[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() | Select-Object *owner
Filed in: Columns, Tips and Tricks Tags: , , ,

4 Responses to "#PSTip Discovering Active Directory FSMO Role Holders using PowerShell"

  1. mbk5us says:

    Very good hint.
    Thanks Shay!

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: