
Service Applications
205
State Service
SharePoint 2010 provides a State Service application to manage the overall session state behavior
within the provided SharePoint environment. There is a
Set-SPStateServiceApplication cmdlet,
but that is used only to rename a particular State Service application instance.
Set-SPStateServiceApplication
[-Identity] <SPStateServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm [<SwitchParameter>]]
[-Name <String>]
[-WhatIf [<SwitchParameter>]] [<CommonParameters>]
You may use Get-SPStateServiceApplication to display all State Service applications running on
the farm and therefore retrieve the appropriate
-Identity value.
There are also various database operations that may be performed for the State Service application
using the
SPStateServiceDatabase variations of cmdlets:
New-SPStateServiceDatabase
Remove-SPStateServiceDatabase
Get-SPStateServiceDatabase
Set-SPStateServiceDatabase
Mount-SPStateServiceDatabase
Dismount-SPStateServiceDatabase
Initialize-SPStateServiceDatabase
Suspend-SPStateServiceDatabase
Resume-SPStateServiceDatabase
In addition to managing the State Service Application, you may also manage the actual Session State
Service using variations of the
SPSessionStateService cmdlet:
Get-SPSessionStateService
Set-SPSessionStateService
Enable-SPSessionStateService
Disable-SPSessionStateService ...