Export-PimSettings
Export PIM Manager settings to a settings document (settings as code)
Part of the PIM Manager release - not a standalone download; it runs via the product's own install command or the updater.
Purpose
Exports PIM Manager settings (for example the naming conventions) from one environment's store to a settings document (a JSON file) that Import-PimSettings.ps1 applies to another environment: settings as code, never secrets, never identity or access settings.
When to run it
When an environment's settings should be kept as code (in source control, reviewed) or used as the baseline for a new environment. Settings that are secrets or that name the environment itself (who may use it, approvers, break-glass accounts, demo mode, environment name, licence and install keys, rings, the scenario, runtime state) are never exported: a -Name that asks for one is refused, -All leaves them out and lists them.
Who may run it
| Kind | Role | Scope | Why |
|---|---|---|---|
| other | Store reader (application with a certificate, member of the environment's SQL admin group) | the environment's SQL database (pim.Settings) | Reads the settings to export. The identity is given with -ClientId / -CertThumbprint and its certificate must be in the local machine certificate store. |
What it changes
| Where | Action | What | Permission / role | Scope | Why | Undo |
|---|---|---|---|---|---|---|
| This computer | create | the settings document at -Path (one JSON file) | this computer | The point of the script: the exported settings, ready for Import-PimSettings.ps1. An existing file is replaced only with -Force. | Delete the file. |
What it only reads
- pim.Settings in the store (the named settings, or every name with -All, and the environment name)
Parameters
| Parameter | Required | Default | What it does |
|---|---|---|---|
| -Name | no | The setting(s) to export, e.g. NamingConventions. Give -Name or -All. | |
| -All | no | false | Export every setting that may be exported; the others are listed as skipped. |
| -Path | yes | The settings document (.json) to write. | |
| -Server | yes | The store's SQL server (FQDN). | |
| -Database | no | PimPlatform | The database. |
| -TenantId | yes | The environment's tenant id. | |
| -ClientId | yes | Application (client) id of the identity that reads the store. | |
| -CertThumbprint | yes | Thumbprint of that identity's certificate in the local machine store. | |
| -Force | no | false | Replace -Path when it already exists. |
Preview with -WhatIf
Reads the store, lists each setting it would export (and each one it skips, with the reason) and prints 'What if: Performing the operation "write the settings document (<n> setting(s))" on target "<Path>"'. Nothing is written.
Undo
The script changes nothing in any environment. Delete the settings document it wrote.
Network
It connects to: login.microsoftonline.com (tokens for Azure SQL, certificate sign-in), <server>.database.windows.net:1433
How it runs
Part of the PIM Manager release - not a standalone download; it runs via the product's own install command or the updater.
Release 3.0.70
Every script, identity and permission for your security review: PIM Manager