I’d like to give you some ideas about the creation of managed accounts for your SharePoint 2013 deployment. The process of creating all the accounts is quite time consuming. When you’re done reading this post you get a good idea on how to speed up the process.
Create the input file with the required SharePoint 2013 accounts
The first step is to create an input file for the PowerShell script. This file will contain all accounts that are needed for a clean SharePoint 2013 deployment.
We use a naming convention for our users. The names consists of three parts.
- [svc] as an abbreviation for service
- [FarmName] the name of the SharePoint 2013 farm
- [ServiceName] the abbreviation for the service the account is used for
Feel free to adjust the usernames to your needs.
Save this file as users.txt.
The PowerShell script to create the accounts
Next step is to create a Windows PowerShell script to create the users. It will read the input from the input file.
Make sure you adjust the parameters in the script file. Wrong parameters will cause failures.
The parameters are prefaced with a comment. That comment contains a description of the parameter.
Save this file as createusers.ps1 in the same folder as your input file.
Log on to a Domain Controller and make sure you can create Active Directory users. Start a new PowerShell and execute the script.
When everything went OK, you have created all required accounts and saved plenty of time. Put this into your tool belt and save even more time on your next deployment 🙂
We don’t care about the password. SharePoint 2013 will change the passwords, after we registered them as managed accounts.
In the second part we create the script that registers all the accounts with SharePoint 2013.