FSMO roles from the command line

Posted on December 26, 2006 • 1 min read • 158 words
Of course, we’re all spoiled by Windows. Everything wonderfully clickity-click (sorry, stolen word, I know), everything with a mouse and pictures. But to…

Of course, we’re all spoiled by Windows. Everything wonderfully clickity-click (sorry, stolen word, I know), everything with a mouse and pictures. But to find out things like FSMO roles, you’re still clicking quite a bit. This still takes quite a bit of your time.

Thankfully, this can be a lot simpler in Windows Server 2003. Using the command ‘dsquery’, you can quickly find out which servers have the FSMO roles.

dsquery server -domain xyz.nl -isgc gives you the global catalog servers of your domain. Similarly, dsquery -forest -isgc gives you GC’s from the forest and dsquery -site Default-First-Site-Name -isgc those from the named site.

The other FSMO roles are also easy to find out. With dsquery server -hasfsmo rid, dsquery server -hasfsmo infr, dsquery server -hasfsmo pdc, dsquery server -hasfsmo schema, dsquery server -hasfsmo name, you can quickly find out the relevant role. Here too, -domain and -forest can be used to indicate the scope of the command.

See also

    Follow me