title: Can I add to local administrators group only by registry edit?
body: <p>I am trying to add a domain user to the local administrator group. It fails from the command prompt and powershell. Can I do an offline registry edit to achieve this? </p>
  
  <pre><code>net localgroup administrators ASIAPACIFIC\mullick /add
  </code></pre>
  
  <blockquote>
    <p>Error: System error 5 has occurred. Access is denied.</p>
  </blockquote>
  
  <pre><code>$domain = "whatever"
  $strComputer = "XYZ"
  $username = "test"
  $computer = [ADSI]("WinNT://" + $strComputer + ",computer")
  $Group.Add("WinNT://" + $domain + "/" + $username)
  </code></pre>
  
  <blockquote>
    <p>Error: <em>Exception calling "Add" with "1" argument(s): "Access is denied.</em></p>
  </blockquote>
  
  <p>There even isn't a <a href="http://www.ehow.com/how_8053161_make-administration-account-using-regedit.html" rel="nofollow">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList</a> key.</p>