Pages

Monday, December 16, 2013

Provisioning the State Service in SharePoint 2010 and SharePoint 2013

The State Service service application is used to maintain state. This is one of those goofy .NET
developer things which is the equivalent of writing on your hand. It holds the information
temporarily while you use it and then it goes away. Some people assume this isn’t necessary but even
out-of-the-box features use it so just go ahead and provision it to save looking up the error messages
later. Because there is no GUI to do you will be using the SharePoint Management Shell.

1. At the prompt, type the following and press Enter:
New-SPStateServiceApplication -Name "State Service Application"

2. At the prompt, type the following and press Enter:
Get-SPStateServiceApplication| New-SPStateServiceApplicationProxy -defaultproxygroup

3. At the prompt, type the following and press Enter:
Get-SPStateServiceApplication| New-SPStateServiceDatabase -Name "State_Service_DB"

4. At the prompt, type the following and press Enter:
Get-spdatabase | where-object {$_.type -eq "Microsoft.Office.Server.Administration.StateDatabase"} | initialize-spstateservicedatabase