SharePoint 2010: How to Register Managed Accounts via PowerShell
Title
Register Managed Accounts in SharePoint 2010 via PowerShell
Business Goal
In SharePoint 2010 there is a concept called Managed Accounts. You are able to register Active Directory accounts which you can manage via the SharePoint 2010 interface (via Security > General Security > Configure Managed Accounts).
A managed account can have different advantages:
– Credentials are managed and maintained by SharePoint
– When you use a managed account when registering a new Service Application you don’t need to know the credentials
This article describes how to register managed accounts in bulk.
Technical Overview
The solution is just one PowerShell script that uses new-SPManagedAccount cmdlet of SharePoint 2010 Management Shell. It uses the Import-CSV cmdlet to import a csv file in bulk.
Prerequisites
To complete this how-to, you must have the following prerequisites must be met:
– A domain account that can log on to one of the SharePoint 2010 servers
– A domain account that has privileges to manage SharePoint 2010 via PowerShell (SPShellAdmin role)
Steps
1. Create a csv file with two columns, UserName and Password
2. Run the Powershell script in SharePoint 2010 Management Shell via the following command
Additional resources
Bill Baer – Managed Accounts
Gallery Technet – Create New Managed Accounts
Technet – Configure automatic password change (SharePoint Server 2010)
Technet – Get-SPShellAdmin
Technet – New-SPManagedAccount
Technet – Import-CSV
Applies to
SharePoint 2010
Change History
23-06-2014 – 1.0
1 Response
[…] The solution is a PowerShell script that uses new-SPServiceApplicationPool cmdlet of SharePoint 2010 Management Shell. It uses the Import-CSV cmdlet to import a csv file in bulk. It also has an dependency with my previous Managed Accounts Powershell script. […]