Skip to content

SPServiceAppProxyGroup

dscbot edited this page Mar 17, 2023 · 18 revisions

SPServiceAppProxyGroup

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String Name of the Proxy Group to create
Ensure Write String Present creates the proxy group if it does not already exist, Absent will delete the proxy group if it exists Present, Absent
ServiceAppProxies Write StringArray[] List of service application proxies that belong in this proxy group, all others will be removed
ServiceAppProxiesToInclude Write StringArray[] List of service application proxies to add to this proxy group, existing proxies will remain
ServiceAppProxiesToExclude Write StringArray[] List of service application proxies to remove from this proxy grop, all others will remain

Description

Type: Distributed Requires CredSSP: No

This resource is used to manage SharePoint Service Application Proxy Groups. The "Ensure" parameter controls whether or not the Proxy Group should exist. A proxy group cannot be removed if a web application is using it. The "ServiceAppProxies" property will set a specific list of Service App Proxies to be members of this Proxy Group. It will add and remove proxies to ensure the group matches this list exactly. The "ServiceAppProxiesToInclude" and "ServiceAppProxiesToExclude" properties will allow you to add and remove proxies from the group, leaving other proxies that are in the group but not in either list intact.

Use the proxy group name "Default" to manipulate the default proxy group.

Requirements: At least one of the ServiceAppProxies, ServiceAppProxiesToInclude or ServiceAppProxiesToExclude properties needs to be specified. Do not combine the ServiceAppProxies property with the ServiceAppProxiesToInclude and

The default value for the Ensure parameter is Present. When not specifying this parameter, the proxy group is created.

Examples

Example 1

This example creates two seperate proxy groups of service apps that can be assigned to web apps in the farm

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPServiceAppProxyGroup ProxyGroup1
        {
            Name              = "Proxy Group 1"
            Ensure            = "Present"
            ServiceAppProxies = "Web 1 User Profile Service Application", "Web 1 MMS Service Application", "State Service Application"
        }

        SPServiceAppProxyGroup ProxyGroup2
        {
            Name                       = "Proxy Group 2"
            Ensure                     = "Present"
            ServiceAppProxiesToInclude = "Web 2 User Profile Service Application"
        }
    }
}
Clone this wiki locally