Create a Managed Account out of a Local User

Since I am a glutton for punishment according to my wife, (I see nothing wrong with long runs in the heat of the day or multiple hours of intense Ultimate Frisbee in 30 degree weather) I have been building a single server SharePoint 2010 farm using local user accounts. That’s right, no silly Active Directory for me.

As I noted in my Installing SharePoint 2010 with Local User Accounts blog post there is a trick to getting around creating the configuration and content databases because you lack a real domain, and the solution being PowerShell.

The next thing most of us try to do after a successful install is to setup site collections and service applications. But to do this you must setup a new web application. I’ll leave you to find your way there through the Central Admin, your smart I know you can do it.

As you setup a web app you will be asked to use the default security account, Network Services, or a custom account to run the application pool under. If you like me you would prefer to use a specifically identified account.

So you’ve clicked Register New Managed Account because the custom service account you’ve created is not listed, and guess what you get an error.

image

Which read “The specified user is a local account. Local accounts should only be used in stand alone mode.” What is a person to do?

PowerShell to your rescue! There is a set of cmdlet called SPManagedAccount.

The first step is to register the desired account as a managed account via New-SPManagedAccount. You will be prompted to enter the users credentials: <domain\computer name>\username and password. (The computer name is very important as part of the credentials.)

The Set-SPManagedAccount (http://technet.microsoft.com/en-us/library/ff607617.aspx) allows for you to further customize or reset the password and assignment of the managed account.

Now you can try to create the Web application or other object which requires a managed account, and in the dropdown you will see your newly registered account.