0

I know there are many reasons why a SharePoint 2010 Server should not be on a Domain Controller but this is for a test Server that was rolled up quickly.

The current problem is I need to run Powershell as a local administrator. Domain controllers can't have local users so I'm not sure how I can add a Shell admin.

Any suggestions or is it a lost cause?

  • Can't you run your PowerShell script as Administrator (of the server) and not SP_Admin? – Benny Skogberg Jul 3 '13 at 12:50
1

Using Add-SPShellAdmin should do the trick. Be sure to run the SharePoint management shell as an administrator if you have User Account Control activated.

Add-SPShellAdmin reference:

http://technet.microsoft.com/en-us/library/ff607596(v=office.14).aspx

  • Sorry, I should have added the Add-SPShellAdmin command won't work because it needs to be run under a local admin account – DBWArnold Jul 3 '13 at 11:59
  • Normally that should also work on a domain controller. What kind of error message do you get? – Thomas Vochten Jul 3 '13 at 12:11
  • Add-SPShellAdmin : You need to have Machine administrator priviliges to run this cmdlet. The problem being that I can't run the Powershell cmdlet with a machine account because it is a domain controller. This is run under the Share Point administration account. – DBWArnold Jul 3 '13 at 12:32
  • 1
    Figured it out. Log in as admin (Run As won't work). Turn off UAC in Control Panel -> User Accounts -> Change User Account Control Settings. Run Powershell as Admin and it should work fine now. – DBWArnold Jul 3 '13 at 13:08
  • Okay, was ready to install an all-in-one box just to check if I was not getting crazy :) Glad it worked! – Thomas Vochten Jul 3 '13 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.