Posts Tagged ‘State Service’

Recreating the SharePoint 2010 State Service #SP2010 #SharePoint #PS2010 #MSProject #ProjectServer

July 20, 2011 1 comment

My client was so eager to get SP1 and the June 2011 Cumulative Updates up and running on the Development and Test environments that on day one I was installing and testing the updates on my project.

What on earth was my clients requirement I hear ask? couldn’t they wait?

Well the end users are heavy Linux users and the requirement for Timesheet data entry within Firefox is v.strong.  As a result, testing SP1 outside of the beta that we had already tested was top priority.

Of course, a few days later the June 2011 Cumulative Update was re-released and it is widely known that the State Service among other things can go wrong.

Looking into it further and the State Service cannot be created in the usual method (clicking the new button in the Managed Service section of Central Administration).

So PowerShell to the rescue:


$StateServiceDB = "SP2010_StateService"
$GetSPStateServiceApplication = Get-SPStateServiceApplication

If ($GetSPStateServiceApplication -eq $Null)
   Write-Host -ForegroundColor White "- Creating State Service Application..."
   New-SPStateServiceDatabase -Name $StateServiceDB | Out-Null
   New-SPStateServiceApplication -Name "State Service Application"
 -Database $StateServiceDB | Out-Null
   Get-SPStateServiceDatabase | Initialize-SPStateServiceDatabase | Out-Null
   Write-Host -ForegroundColor White " - Creating State Service
 Application Proxy..."
   Get-SPStateServiceApplication | New-SPStateServiceApplicationProxy
 -Name "State Service Application Proxy" -DefaultProxyGroup | Out-Null
   Write-Host -ForegroundColor White "- Done creating State Service
   Write-Host -ForegroundColor White "- State Service Application
 already exists."
%d bloggers like this: