Skip to content

SPSecureStoreServiceApp

Yorick Kuijs edited this page Apr 1, 2021 · 18 revisions

SPSecureStoreServiceApp

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String The name of the secure store service app
ProxyName Write String The proxy name, if not specified will be /Name of service app/ Proxy
ApplicationPool Required String The name of the application pool it will run in
AuditingEnabled Required Boolean Is auditing enabled for this service app
AuditlogMaxSize Write UInt32 What is the maximum size of the audit log in MB
DatabaseCredentials Write PSCredential If using SQL authentication, the SQL credentials to use to connect to the instance
DatabaseName Write String The name of the database for the service app
DatabaseServer Write String The name of the database server to host the database
FailoverDatabaseServer Write String The name of the database server hosting a failover instance of the database
PartitionMode Write Boolean Is partition mode enabled for this service app
Sharing Write Boolean Is sharing enabled for this service app
MasterKey Write PSCredential Specify the Master Key to be used to encrypt the secrets. Only used during creation of the Service Application
Ensure Write String Present if the service app should exist, absent if it should not Present, Absent
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?

Description

Type: Distributed Requires CredSSP: No

This resource is responsible for provisioning and configuring the secure store service application. The parameters passed in (except those related to database specifics) are validated and set when the resource is run, the database values are only used in provisioning of the service application.

The default value for the Ensure parameter is Present. When not specifying this parameter, the service application is provisioned.

Examples

Example 1

This example creates a new secure store service app.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPSecureStoreServiceApp SecureStoreServiceApp
        {
            Name                 = "Secure Store Service Application"
            ApplicationPool      = "SharePoint Service Applications"
            AuditingEnabled      = $true
            AuditlogMaxSize      = 30
            DatabaseName         = "SP_SecureStore"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example removes a secure store service app. The ApplicationPool and AuditingEnabled parameters are required, but are not used so their values are able to be set to anything.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPSecureStoreServiceApp SecureStoreServiceApp
        {
            Name                 = "Secure Store Service Application"
            ApplicationPool      = "n/a"
            AuditingEnabled      = $false
            Ensure               = "Absent"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally