Repository
PowerShell Universal primarily stores configuration in its repository. The default repository folder is %ProgramData%\UniversalAutomation\Repository; change the location in appsettings.json.
The repository contains PowerShell configuration scripts and XML files created by the admin console. PowerShell Universal watches the folder for changes and reloads the affected configuration. When Git synchronization is enabled, this is the folder synchronized with the remote repository.
All configuration cmdlets are part of the Universal module.
What's stored in the repository
Configuration is stored as plain text for source-control-friendly diffs. Repository-backed resources include authentication, AI agents and tools, apps, endpoints, environments, licenses, login pages, pages, published folders, rate limits, roles, schedules, scripts, settings, tags, triggers, variables, and vaults.
App tokens, identities, and job history are stored in the PowerShell Universal database.
Editing the repository
Edit repository files in the admin console under Source Control > Files / Repository > Files, where you can create folders and edit files in the repository directory. You can also edit files on disk with an editor such as Visual Studio Code.
When editing on disk, enable automatic reload or resolve changes manually. View pending changes under Source Control > Files / Repository > Configuration Changes.
Configuration scripts
Configuration scripts live in the .universal directory. The admin console maintains the generated portions of these files, while the PSUHeader and PSUFooter regions remain read-only. Use these regions for custom logic, generated resources, or classes required by OpenAPI schemas.
#region PSUHeader
1..100 | ForEach-Object {
New-PSUEndpoint -Url "/endpoint/$_" -Endpoint { }
}
#endregion
New-PSUEndpoint -Url '/user' -Endpoint { }
#region PSUFooter
#endregionauthentication.ps1
Forms authentication configuration.
aiAgents.ps1 and aiTools.ps1
AI agents and tools.
branding.ps1
Branding settings.
dashboards.ps1
App registration and metadata.
endpoints.ps1
API endpoint definitions.
environments.ps1
Execution environments.
healthChecks.ps1
Health checks.
initialize.ps1
Runs before configuration discovery starts.
licenses.ps1
Product license configuration.
middleware.ps1
HTTP request customization.
publishedFolders.ps1
Published folders.
rateLimits.ps1
Rate limits.
roles.ps1
Roles.
schedules.ps1
Schedules.
scripts.ps1
Script metadata; script paths can be repository-relative or absolute.
settings.ps1
Platform settings.
tags.ps1
Tags.
triggers.ps1
Triggers.
variables.ps1
Variables.
vaults.ps1
Vaults.
workflows.ps1
Workflow definitions when workflows use repository persistence.
Templates
Use the Templates folder to provide templates for commonly created resources in the admin console. PowerShell scripts in the following folders appear as templates:
Templates\AppTemplates\AppPageTemplates\EndpointTemplates\Script
.psuignore
Use .psuignore to exclude files and paths from the configuration file-system watcher. This is useful for logs or other files that are stored beside configuration. Add one regular expression per line; matching paths are ignored.
File encoding
Configure file encoding under Settings gear > General. The default is UTF-8 with a byte-order mark (utf-8-bom). Select utf-8 to omit the byte-order mark.
PowerShell Universal supports the encodings returned by Encoding.GetEncodings, including utf-32, utf-32-bom, utf-8, utf-8-bom, and windows-1250. Add -bom to an encoding name to include a byte-order mark.
Database resources
You can store selected resources in the database instead of the configuration repository. Database-backed resources are available immediately across connected computers in a PowerShell Universal cluster.
[!WARNING] When a resource is configured for database persistence, PowerShell Universal ignores its repository configuration file.
Apps, endpoints with paths, scripts, and modules cannot use database persistence.
Configure a resource by setting Data:Persistence:<ResourceType> to Database in appsettings.json, then restart PowerShell Universal. For example, this stores workflows in the database instead of .universal\workflows.ps1:
Set the equivalent environment variable before starting PowerShell Universal:
After restart, new and edited workflows are saved to the database and retained across restarts. Workflow parameters follow the parent workflow persistence setting, so they are also stored in the database. The same setting pattern applies to every supported database resource.
For example, the following stores schedules and schedule parameters in the database:
Last updated
Was this helpful?