Thursday, 12 June 2014

New-SPManagedAccount PowerShell Access is Denied Cross-Domain Accounts

I guess you have see this error when you tried to add another domain's user to your farm's managed accounts.

New-SPManagedAccount : An error occurred while getting information about the user <username> at server <servername>: Access is denied.

You need to follow the instructions as follows to get round the issue:

1. You need to add the Remote domain user to the local admins of the server but before that you run this command Add-SPShellAdmin -UserName DOMAIN\UserName



2. Add the DOMAIN\UserName to the Local Administrators Group

3. Run PowerShell as different user (using this DOMAIN\UserName)


4. run $cred = Get-Credential


Enter the user and password you want to add in the managed account (DOMAIN\AnotherUserName) and press OK, now the credentials of the Remote user is saved in the $cred

5. run New-SPManagedAccount -Credential $cred

Press Enter and there you go, the Remote user from a different domain is now added to your Managed accounts.

You can check that in your Security ->  General Security -> Configure Managed Accounts in the SharePoint Central Administration






1 comment:

  1. Beautiful! Just works. :)
    Thanks and congratulations!

    ReplyDelete