psu Command Line Tool

psu is a command line utility for working with PowerShell Universal.

psu is included with the PowerShell Universal installation media.

admin

Admin account operations

reset

Reset the local admin account password in the event of a lockout. The account will be admin with a password of admin .

psu admin reset --connection-string 'Data Source=C:\ProgramData\UniversalAutomation\database.db'
Argument
Description
Required

--connection-string

The database connection string

βœ…

--database-type

PostgreSQL, SQL or SQLite (default)

❌

--encryption-key

Database vault encryption key, if changed.

❌

--password

Database vault password, if changed.

❌

--key-size

Database vault password key size, if changed from 128.

❌

db

Commands for working with the PowerShell Universal database.

convert

Convert a v4 LiteDB Database to SQLite

Argument
Description
Required

--path

The path of the database to convert

βœ…

schema

Migrate from one schema version to another. Migrating to lower versions can cause data loss. This can also be used to create a new database from scratch at the target schema.

Argument
Description
Required

--connection-string

Connection string to the database

βœ…

--target-version

The database schema version. Defaults to "Latest"

❌

--database-type

PostgreSQL, SQL or SQLite (default)

❌

migrate

Migrates from one database to another. This command can migrate between database types.

Argument
Description
Required

--target-connection-string

Target database connection string

βœ…

--source-connection-string

Source database connection string

βœ…

--target-database-type

PostgreSQL, SQL or SQLite (default)

❌

--source-database-type

PostgreSQL, SQL or SQLite (default)

❌

Migrating between versions

We recommend you update the schema of your database to the version you wish to migrate to before running the migration command to avoid differences in the schema.

git

Commands for working with PSU git repositories. This command uses the internal git services to work with the local repository.

clone

Clones a git repository using the git sync service.

Argument
Description
Required

--url

The URL of the git remote.

βœ…

--path

The local path to clone to

βœ…

--username

The user name for the remote.

❌

--password

The password for the remote

❌

--branch

The branch to clone (default is main).

❌

pull

Pulls from a git remote. A clone will be called if the local repository does not exist.

Argument
Description
Required

--url

The URL of the git remote.

βœ…

--path

The local path to clone to

βœ…

--username

The user name for the remote.

❌

--password

The password for the remote

❌

--branch

The branch to clone (default is main).

❌

push

Pushes to a git remote. The repository needs to be cloned first. Changes will not be staged during the push.

Argument
Description
Required

--url

The URL of the git remote.

βœ…

--path

The local path to clone to

βœ…

--username

The user name for the remote.

❌

--password

The password for the remote

❌

--branch

The branch to clone (default is main).

❌

Last updated

Was this helpful?