Information about the PowerShell Universal repository.
The configuration data for PowerShell Universal is primarily stored within the repository. By default, the repository folder can be found in %ProgramData%\UniversalAutomation\Repository
. You can adjust the location of the repository by editing the appsettings.json
file.
The repository contains PowerShell scripts and XML files that are produced when using the PowerShell Universal admin console. The repository folder is also watched for changes so any change made on disk will cause the system to reload the file and reconfigure the platform. When using Git integration, the repository folder is what is synchronized with the git remote.
All configuration cmdlets are part of the Universal module.
Files stored in the repository are stored as plain text to allow for easy differencing with source control tools.
Authentication
Dashboards
Endpoints
Environments
Licenses
Login Pages
Pages
Published Folders
Rate Limits
Roles
Schedules
Scripts
Settings
Tags
Triggers
These entities are stored within the PowerShell Universal database.
App Tokens
Identities
Job History
You can edit the repository files directly in the admin console by navigating to Settings \ Configurations. The editor allows you to create files and folders and edit any file within the repository directory.
Stored in .universal\authentication.ps1
This script is responsible for configuring forms authentication. If forms authentication is not being used, this file is ignored.
You can use the Set-PSUAuthentication
cmdlet in this file.
Stored in .universal\dashboards.ps1
This script is responsible for registering PS1 files are dashboards with the system. Each command contains the meta-data for the dashboard including name, base URL, and environment.
You can use the New-PSUDashboard
cmdlet in this file.
Stored in .universal\endpoints.ps1
This script is responsible for defining all the API endpoints within the PowerShell Universal instance.
You can use the New-PSUEndpoint
cmdlet in this file.
Stored in .universal\environments.ps1
This script is responsible for defining all the environments within PowerShell Universal.
You can use the New-PSUEnvironment
cmdlet in this file.
Stored in .universal\licenses.ps1
This script is responsible for defining the license used in PowerShell Universal.
You can use the Set-PSULicense
cmdlet in this file.
Stored in .universal\loginPage.ps1
This script is responsible for configuring a custom login page.
You can use the New-PSULoginpage
and New-PSULoginPageLink
in this file.
Stored in .universal\initialize.ps1
This script runs before any configuration is done within PowerShell Universal. The server is running but none of the services have started. This is useful for install modules or configuring secret vaults before discovery of those resources are started.
Stored in the pages
folder.
This folder contains the page XML files. These are not intended to be edited manually and should be edited with the page designer.
Stored in .universal\publishedFolders.ps1
This script is responsible for configuring published folders.
You can use the New-PSUPublishedFolder
cmdlet in this file.
Stored in .universal\rateLimits.ps1
This script is responsible for configuring rate limits.
You can use the New-PSURateLimit
cmdlet in this file.
Stored in .universal\roles.ps1
This script is responsible for configuring roles.
You can use the New-PSURole
cmdlet in this file.
Stored in .universal\schedules.ps1
This script is responsible for configuring schedules.
You can use the New-PSUSchedule
cmdlet in this file.
Stored in .universal\scripts.ps1
This script contains the meta-data for scripts. Actual scripts can be stored anywhere. The path that is included is relative to the repository. Full path names are also allowed.
You can use the New-PSUScript
cmdlet in this file.
Stored in .universal\settings.ps1
This script is responsible for configuring system settings.
You can use the Set-PSUSetting
cmdlet in this file.
Stored in .universal\tags.ps1
This script is responsible for configuring tags.
You can use the New-PSUTag
cmdlet in this file.
Stored in .universal\triggers.ps1
This script is responsible for configuring triggers.
You can use the New-PSUTrigger
cmdlet in this file.
Stored in .universal\variables.ps1
This script is responsible for configuring variables.
You can use the New-PSUVariable
cmdlet in this file.
A custom configuration script can be executed within the configuration process. The path to the configuration script can be defined in appsettings.json
or as an environment variable.
You can chose to return items such as endpoints, scripts or dashboards from the script. Additionally, you can use this script to configure resources like modules and secret vaults before the system is started. The custom configuration script is run before any other configuration scripts.
Read-Only sections allow you to include script in your configuration files that will not be touched by changes in the admin console. This allows you to run additional logic, generate resources dynamically and create classes for use in OpenAPI schemas.
The PSUHeader
region is placed at the top of your script. PSUFooter
is placed at the bottom.