Skip to content

SPSubscriptionSettingsServiceApp

Yorick Kuijs edited this page Jul 10, 2020 · 19 revisions

SPSubscriptionSettingsServiceApp

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String The name of the subscription settings service app
ApplicationPool Required String The name of the application pool the service app runs in
DatabaseName Write 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 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

Description

Type: Distributed Requires CredSSP: No

This resource is used to provision and manage an instance of the Subscription Settings Service Application. It will identify an instance of the subscription settings service app through the application display name. Currently the resource will provision the serviceapp if it does not yet exist, and will change the service account associated to the app if it does not match the configuration. Database names or server name will not be changed if the configuration does not match, these parameters are only used for the initial 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 subscription settings service app in the local farm.

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

        node localhost {
            SPSubscriptionSettingsServiceApp SubscriptionSettingsServiceApp
            {
                Name                 = "Subscription Settings Service Application"
                ApplicationPool      = "SharePoint web services"
                DatabaseServer       = "SQL01.contoso.com"
                DatabaseName         = "SP_SubscriptionSettings"
                PsDscRunAsCredential = $SetupAccount
            }
        }
    }

Example 2

This example removes a subscription settings service app in the local farm. The ApplicationPool property is required, but is ignored when removing a service app.

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

        node localhost {
            SPSubscriptionSettingsServiceApp SubscriptionSettingsServiceApp
            {
                Name                 = "Subscription Settings Service Application"
                ApplicationPool      = "n/a"
                PsDscRunAsCredential = $SetupAccount
                Ensure               = "Absent"
            }
        }
    }
Clone this wiki locally