Skip to content

SPStateServiceApp

Brian Farnhill edited this page Sep 21, 2016 · 18 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key string The name of the state service app
DatabaseCredentials Write String The database credentials for accessing the database
DatabaseName Required string The name of the database for the service app
DatabaseServer Write string The name of the database server
Ensure Write string Present if the service app should exist, absent if it should not Present, Absent
InstallAccount Write String POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

Description

This resource provisions an instance of the state service in to the local farm. The database specific parameters are only used during initial provisioning of the app, and will not change database settings beyond the initial deployment.

Examples

Example 1

This example creates a state service application in the local farm

Configuration Example 
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )
    Import-DscResource -ModuleName SharePointDsc

    node localhost {
        SPStateServiceApp StateServiceApp
        {
            Name                 = "State Service Application"
            DatabaseName         = "SP_State"
            Ensure               = "Present"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally