Fix-FSMORoles is a Powershell script that implements the behaviour of fixFSMO.vbs. FixFSMO.vbs is an old script provided by Microsoft for resolving issues where domain-level FSMO role metadata becomes corrupted in AD (often as a result of forcible removal of a DC). If you don't know what FSMO roles are, start here.
I wrote this script for 2 reasons:
- I needed to fix a problem with FSMO roles in a production environment, and
- I am not particularly familiar with vbscript and wanted to ensure I understood the actions that would be taken during remediation.
I have a writeup of the original problem, along with a breakdown of how the script works, in this blog post.