Skip to content

SPAppManagementServiceApp

dscbot edited this page Mar 17, 2023 · 19 revisions

SPAppManagementServiceApp

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String The name of the app management service application
ProxyName Write String The proxy name, if not specified will be /Name of service app/ Proxy
ApplicationPool Required String The app pool that should be used to run the service app
DatabaseName Write String The name of the database for the service application
DatabaseServer Write String The name of the server for the database
Ensure Write String Present ensures service app exists, absent ensures it is removed Present, Absent
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 App Management Services Service Application. It will identify an instance of the app management service application through the application display name. Currently the resource will provision the app if it does not yet exist, and will change the application pool 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 shows how to create a new app management service application in the local SharePoint farm.

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPAppManagementServiceApp AppManagementServiceApp
        {
            Name                 = "App Management Service Application"
            ApplicationPool      = "SharePoint Service Applications"
            DatabaseServer       = "SQL01.contoso.com"
            DatabaseName         = "SP_AppManagement"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example shows how to remove a specific app management service application in the local SharePoint farm. The application pool property is still mandatory but it is not used so therefore the value is not important.

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPAppManagementServiceApp AppManagementServiceApp
        {
            Name                 = "App Management Service Application"
            ApplicationPool      = "n/a"
            Ensure               = "Absent"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally