-
Notifications
You must be signed in to change notification settings - Fork 107
SPSessionStateService
Yorick Kuijs edited this page Nov 13, 2020
·
18 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
DatabaseName | Key | String | The name of the database for the service | |
DatabaseServer | Key | String | The name of the database server for the database | |
Ensure | Write | String | Present is the state service should be enabled, absent if it should be disabled | Present, Absent |
SessionTimeout | Write | UInt32 | What is the timeout on sessions | |
InstallAccount | Write | PSCredential | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 | |
UseSQLAuthentication | Write | Boolean | Should SQL Server authentication be used to connect to the database? | |
DatabaseCredentials | Write | PSCredential | If using SQL authentication, the SQL credentials to use to connect to the instance |
Type: Distributed Requires CredSSP: No
This resource will provision a state service app to the local farm. Specify the name of the database server and database name to provision the app with, and optionally include the session timeout value. If session timeout is not
The default value for the Ensure parameter is Present. When not specifying this parameter, the service application is provisioned.
This example creates a new session state service on the local farm.
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPSessionStateService StateServiceApp
{
DatabaseName = "SP_StateService"
DatabaseServer = "SQL.test.domain"
Ensure = "Present"
PsDscRunAsCredential = $SetupAccount
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations