-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
- PowerShell 5.1 or later
- CredSSP configured between the servers
- Administrative privileges on the SharePoint Server
- The same farm service account across every farm you want to trust
SPSTrust is an idempotent orchestration script. Given your farm topology and the trust relationships you declare in a configuration file, it performs four stages:
- Exchange certificates — export each farm's STS and ROOT certificates to a shared folder, then import them on the publishing farms.
- Publish service applications — publish each declared service application on its local (publishing) farm.
- Grant permissions — grant the consuming farms access to the Application Discovery and Load Balancing (Topology) service and to each published service application.
- Connect proxies — create the service application proxy on each consuming farm.
The -CleanServices switch reverses every stage (remove proxies, revoke
permissions, unpublish, and remove trust).
Shared logic lives in the SPSTrust.Common PowerShell module (Modules/SPSTrust.Common),
which the entry script imports at runtime. Remote actions are executed on the target
servers through New-PSSession with CredSSP authentication.
You can manually configure CredSSP through a few PowerShell cmdlets (and potentially group policy to configure the allowed delegate computers). Some basic instructions can be found at Understanding CredSSP.
It is possible to use a DSC resource to configure your CredSSP settings on a server and include this in all of your SharePoint server configurations. This is done through the xCredSSP resource. The example below shows how this can be used.
xCredSSP CredSSPServer { Ensure = "Present"; Role = "Server" }
xCredSSP CredSSPClient { Ensure = "Present"; Role = "Client"; DelegateComputers = $CredSSPDelegates }In the above example, $CredSSPDelegates can be a wildcard name (such as *.contoso.com
to allow all servers in the contoso.com domain), or a list of specific servers (such as
server1, server2 to allow only specific servers).
-
Download the latest release
and unzip it to a directory on one of your SharePoint Servers. The archive extracts to
SPSTrust.ps1and aModules/folder. - Prepare your configuration file. Copy
Config/CONTOSO-PROD.example.psd1toConfig/<Application>-<Environment>.psd1and edit it — see the Configuration page for details. - Run the script:
.\SPSTrust.ps1 -ConfigFile '.\Config\CONTOSO-PROD.psd1' -FarmAccount (Get-Credential)Continue to the Configuration page.
A full list of changes in each version can be found in the change log.