-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
GitHub Action edited this page Jul 10, 2026
·
3 revisions
| Parameter | Required | Description |
|---|---|---|
-ConfigFile |
Yes | Path to the .psd1 configuration file. |
-FarmAccount |
Yes | Credential of the service account that runs the script (same on all farms). |
-CleanServices |
No | Switch. Removes published services and trust on each trusted farm. |
-ReportOnly |
No | Switch. Read-only audit: skips all configuration stages and only writes the JSON + HTML trust matrix. |
-LogRetentionDays |
No | Days of transcript logs to keep in Logs\. Defaults to 180. 0 disables pruning. |
-HistoryRetentionDays |
No | Days of archived result snapshots to keep in Results\history\. Defaults to 30. 0 disables pruning. |
Establish trust with a specified configuration and farm account:
.\SPSTrust.ps1 -ConfigFile '.\Config\CONTOSO-PROD.psd1' -FarmAccount (Get-Credential)Remove published services and trust on each trusted farm (note that -FarmAccount
is still required):
.\SPSTrust.ps1 -ConfigFile '.\Config\CONTOSO-PROD.psd1' -FarmAccount (Get-Credential) -CleanServicesProduce a trust matrix (JSON + HTML) without changing anything:
.\SPSTrust.ps1 -ConfigFile '.\Config\CONTOSO-PROD.psd1' -FarmAccount (Get-Credential) -ReportOnlyKeep 30 days of transcript logs instead of the default 180:
.\SPSTrust.ps1 -ConfigFile '.\Config\CONTOSO-PROD.psd1' -FarmAccount (Get-Credential) -LogRetentionDays 30-
Transcript logs are written to a
Logs\folder next toSPSTrust.ps1, named<Application>-<Environment>-<date>.log. Logs older than-LogRetentionDaysare pruned at the end of each run. -
Results & report — every run (including
-ReportOnly) writes a JSON snapshot toResults\<Application>-<Environment>.jsonand an HTML trust matrix toReports\<Application>-<Environment>.html. See the Reports & Audit page. - Progress and per-farm results are streamed to the console (and captured in the transcript).
See the Reports & Audit page for the trust matrix, or the Release Process page for how new versions are shipped.