Home > Work > Recreating the SharePoint 2010 State Service #SP2010 #SharePoint #PS2010 #MSProject #ProjectServer

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

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
 Application."
}
Else 
{
   Write-Host -ForegroundColor White "- State Service Application
 already exists."
}
Advertisements
  1. Johan
    June 6, 2012 at 18:24

    Tank you, saved my day!

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: