Friday, July 23, 2010, 11:19 - SharePoint
Posted by Administrator
This script will automate the process of service accounts creation in SharePoint 2010. The solution exists in 2 parts. The first part is a CSV file, called sp2010_service_accounts.csv, where you can specify the service accounts you need. The second part is a powershell script called SP_ServiceAccounts.ps1.Posted by Administrator
1) Download the zip file from here (http://tomvangaever.be/blog/powershell/ ... rShell.zip)
2) Extract the script to, for example, c:\yourname
3) Run powershell and navigate to c:\yourname

4) Execute SP_ServiceAccounts.ps1
- When you receive an error saying that you cannot execute the powershell script, please enter Set-ExecutionPolicy Unrestricted.The reason for this error is the security setting on your pc that does not allow you to execute a script. This is the so-called Execution Policy. By default, the Execution Policy is set to Restricted. This setting means that you may not run any PS1 script at all.
An overview of the policy levels:
Restricted: Individual cmdlets can run, but not saved Powershell scripts. This is the default setting.
AllSigned: Scripts can run, but must have a digital signature even if written on the local computer. Prompts you before running scripts from trusted publishers.
RemoteSigned: Scripts written on the local computer do not need a digital signature, but any script downloaded from outside (email, IM, Internet) must have a signature to execute.
Unrestricted: Any script can run, but scripts downloaded from outside will run with a warning.
- The first parameter you need to specify is the OU you would like to create for the service accounts.
(for example: SP Service Accounts)
- The second parameter is the location of the csv file containing the service accounts.
(for example: c:\yourname\sp2010_service_accounts.csv)


5) When everything went right, the service accounts specified in the CSV file are created for you in 5 seconds.

Job's done!
PS: I've included the service accounts in the CSV file for you ;)




( 3 / 1627 )

Tom Van Gaever - Blog

Avatar






