# Active Directory – Move-AD Directory Server Operation Master Role: Access is denied

When working with Active Directory one of the common tasks is to move FSMO roles between servers. Well, maybe not that common but it happens from time to time where you have to move all or just some of the FSMO roles. For that purposes, there is single PowerShell command Move-ADDirectoryServerOperationalMasterRole. Sure you can do this via GUI but if there’s one command available to fix it all why bother? To make the move one has to be a Domain Admin, Enterprise Admin and Schema Admin. Everything was going smoothly for some roles but wasn’t working for others.

blog

06 Jan 2019 fr

![Active Directory – Move-AD Directory Server Operation Master Role: Access is denied](/wp-content/uploads/2019/01/img_5c30fc50cc7d2.png)

[Voir les images (4)](#pf-content-image-1-0)

When working with Active Directory one of the common tasks is to move FSMO roles between servers. Well, maybe not that common but it happens from time to time where you have to move all or just some of the FSMO roles. For that purposes, there is single **PowerShell** command **Move-ADDirectoryServerOperationalMasterRole. **Sure you can do this via GUI but if there's one command available to fix it all why bother? To make the move one has to be a **Domain Admin**, **Enterprise Admin** and **Schema Admin**.** **Everything was going smoothly for some roles but wasn't working for others.

```powershell
PS C:\Windows\system32> Move-ADDirectoryServerOperationMasterRole -OperationMasterRole SchemaMaster

cmdlet Move-ADDirectoryServerOperationMasterRole at command pipeline position 1
Supply values for the following parameters:
Identity: XXXXXXX

Move Operation Master Role
Do you want to move role 'SchemaMaster' to server 'XXXXXXX.domain.pl' ?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
Move-ADDirectoryServerOperationMasterRole : Access is denied
At line:1 char:1
+ Move-ADDirectoryServerOperationMasterRole -OperationMasterRole Schema ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (XXXXXXX:ADDirectoryServer) [Move-ADDirector...ationMasterRole], ADExcept
   ion
    + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.MoveADDirectorySer
   verOperationMasterRole
```

### 💡 Access is denied for FSMO move role? What now?

- 💡 Double check of groups my user has

[!\[User account group memberships in Active Directory\](/wp-content/uploads/2019/01/img_5c30f6f6acc32.png)](/wp-content/uploads/2019/01/img_5c30f6f6acc32.png)

- 💡 **ForestMode** and **DomainMode**

[!\[PowerShell output showing Active Directory forest mode and domain mode\](/wp-content/uploads/2019/01/img_5c30f0f8d96c4.png)](/wp-content/uploads/2019/01/img_5c30f0f8d96c4.png)

- 💡 **PowerShell** running as **Administrator**

So what could be wrong? Nothing that can be considered wrong on first sight. The trick is (for whatever reason) to change your **Primary group** to **Schema Admins**.

[!\[Primary group changed to Schema Admins in Active Directory Users and Computers\](/wp-content/uploads/2019/01/img_5c30fd1c6344a.png)](/wp-content/uploads/2019/01/img_5c30fd1c6344a.png)

By default, it should be **Domain Users** but if you're having problems with **FSMO** move, just set your **Primary group** to **Schema Admins** and you're good to go. Remember that you need to log out for the group changes to update properly. After you log back in you should be able to move FSMO role without a problem.

[!\[PowerShell successfully moving the Schema Master FSMO role after the group change\](/wp-content/uploads/2019/01/img_5c30fc50cc7d2.png)](/wp-content/uploads/2019/01/img_5c30fc50cc7d2.png)

## Projets associés

Projets liés aux tags, catégories et au contenu de cet article.

[Tous les projets](/fr/projets/)

Recherche des projets associés...

[Retour au blog](/blog)

## Articles associés

- [Mastering Active Directory Hygiene: Automating Stale Computer Cleanup with CleanupMonster](/fr/blog/mastering-active-directory-hygiene-automating-stale-computer-cleanup-with-cleanupmonster/)
- [Active Directory Replication Summary to your Email or Microsoft Teams](/fr/blog/active-directory-replication-summary-to-your-email/)
- [Report Active Directory Accounts that are Synchronized with Azure AD](/fr/blog/report-active-directory-accounts-that-are-synchronized-with-azure-ad/)

<!-- PowerForge markdown artifact sha256:A57EFF6641E89ADA1D78C83CC39BC9C7761D9DEB9EB78112610484049191ADC1 -->
