Changing FSMO Roles: Access Denied
<p>I'm trying to change FSMO roles of an active directory server by connecting it from a remote server using Invoke-Command. The script is below:</p>

<pre><code>Invoke-Command -ComputerName $hostname -Credential $icred -ScriptBlock {

$global:ErrorActionPreference = "Stop";
import-module activedirectory;

Move-ADDirectoryServerOperationMasterRole -Identity owinfadc01 -OperationMasterRole 0,1,2 -Force -Confirm:$false ;

}
</code></pre>

<p>The problem is that </p>

<blockquote>
  <p>Move-ADDirectoryServerOperationMasterRole</p>
</blockquote>

<p>changes the role of PDC; however, gets "Access is denied" error while trying for RID pool manager. The weird thing is "RID pool manager" and "Infrastructure Library" roles are changed either after waiting couple of minutes. </p>

<p>As a note, my user is a member of both Administrator and Domain Admins.</p>

<p>Thoughts?</p>