> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/de/config/psucli.md).

# psu-Befehlszeilenwerkzeug

`psu` ist im Installationsmedium von PowerShell Universal enthalten.

## admin

Vorgänge für Admin-Konten

### reset

Setzt das Passwort des lokalen Admin-Kontos im Falle einer Sperrung zurück. Das Konto lautet dann `admin` mit dem Passwort `admin`.

{% code overflow="wrap" %}

```powershell
psu admin reset --connection-string 'Data Source=C:\ProgramData\UniversalAutomation\database.db'
```

{% endcode %}

| Argument            | Beschreibung                                                           | Erforderlich |
| ------------------- | ---------------------------------------------------------------------- | ------------ |
| --connection-string | Die Datenbank-Verbindungszeichenfolge                                  | ✅            |
| --database-type     | PostgreSQL, SQL oder SQLite (Standard)                                 | ❌            |
| --encryption-key    | Verschlüsselungsschlüssel des Datenbank-Tresors, falls geändert.       | ❌            |
| --password          | Passwort des Datenbank-Tresors, falls geändert.                        | ❌            |
| --key-size          | Schlüsselgröße des Datenbank-Tresor-Passworts, falls von 128 geändert. | ❌            |

## db

Befehle für die Arbeit mit der PowerShell Universal-Datenbank.

### convert

Konvertiert eine v4 LiteDB-Datenbank zu SQLite

```
psu db convert --path C:\ProgramData\UniversalAutomation\databased.db
```

| Argument | Beschreibung                              | Erforderlich |
| -------- | ----------------------------------------- | ------------ |
| --path   | Der Pfad der zu konvertierenden Datenbank | ✅            |

### schema

Migriert von einer Schemaversion zu einer anderen. Die Migration zu niedrigeren Versionen kann zu Datenverlust führen. Dies kann auch verwendet werden, um eine neue Datenbank von Grund auf mit dem Zielschema zu erstellen.

```
psu db schema --connection-string 'Server=SQL;Data Source=PSU;Integrated Security=True' --schema-version 5.1.0 --database-type 'SQL'
```

| Argument            | Beschreibung                                           | Erforderlich |
| ------------------- | ------------------------------------------------------ | ------------ |
| --connection-string | Verbindungszeichenfolge zur Datenbank                  | ✅            |
| --target-version    | Die Datenbank-Schemaversion. Standardwert ist "Latest" | ❌            |
| --database-type     | PostgreSQL, SQL oder SQLite (Standard)                 | ❌            |

### migrate

{% hint style="warning" %}
Die Konvertierung eines Datenbanktyps in einen anderen kann ein problematischer Prozess sein und Sie können auf Probleme stoßen. Es ist besser, den endgültigen Datenbanktyp bereits bei der ersten Installation zu wählen. Beachten Sie, dass SQLite nicht skaliert; wenn Sie erwarten, dass Ihre Instanz später wächst, sollten Sie einen anderen Datenbanktyp wählen.
{% endhint %}

Migriert von einer Datenbank zu einer anderen. Dieser Befehl kann zwischen Datenbanktypen migrieren.

```
psu db migrate --source-connection-string 'Server=SQL;Data Source=PSU;Integrated Security=True' -source-database-type 'SQL' --target-connection-string 'Server=PostgreSQL;Data Source=PSU;Integrated Security=True' --target-database-type 'PostgreSQL'
```

| Argument                   | Beschreibung                               | Erforderlich |
| -------------------------- | ------------------------------------------ | ------------ |
| --target-connection-string | Verbindungszeichenfolge der Zieldatenbank  | ✅            |
| --source-connection-string | Verbindungszeichenfolge der Quelldatenbank | ✅            |
| --target-database-type     | PostgreSQL, SQL oder SQLite (Standard)     | ❌            |
| --source-database-type     | PostgreSQL, SQL oder SQLite (Standard)     | ❌            |

#### Migration zwischen Versionen

Wir empfehlen, das Schema Ihrer Datenbank auf die Version zu aktualisieren, zu der Sie migrieren möchten, bevor Sie den Migrationsbefehl ausführen, um Unterschiede im Schema zu vermeiden.

{% code overflow="wrap" lineNumbers="true" fullWidth="false" %}

```powershell
# Update source schema version
psu db schema --connection-string 'Data Source=C:\ProgramData\UniversalAutomation\database.db' --database-type 'SQLite'
# Migrate to new data source
psu db migrate --source-connection-string 'Data Source=C:\ProgramData\UniversalAutomation\database.db' --target-connection-string 'Server=PostgreSQL;Data Source=PSU;Integrated Security=True' --target-database-type 'PostgreSQL'
```

{% endcode %}

## git

Befehle für die Arbeit mit PSU-Git-Repositories. Dieser Befehl verwendet die internen Git-Dienste für die Arbeit mit dem lokalen Repository.

### clone

Klont ein Git-Repository mithilfe des Git-Sync-Dienstes.

```
psu git clone --url http://github.com/ironmansoftware/psu.git --path C:\ProgramData\UniversalAutomation\Repository --username 'adamdriscoll' --password 'gh__1234123' --branch main
```

| Argument   | Beschreibung                                | Erforderlich |
| ---------- | ------------------------------------------- | ------------ |
| --url      | Die URL des Git-Remotes.                    | ✅            |
| --path     | Der lokale Pfad, in den geklont wird        | ✅            |
| --username | Der Benutzername für das Remote.            | ❌            |
| --password | Das Passwort für das Remote                 | ❌            |
| --branch   | Der zu klonende Branch (Standard ist main). | ❌            |

### pull

Pullt von einem Git-Remote. Ein Klonen wird aufgerufen, wenn das lokale Repository nicht existiert.

```
psu git pull --url http://github.com/ironmansoftware/psu.git --path C:\ProgramData\UniversalAutomation\Repository --username 'adamdriscoll' --password 'gh__1234123' --branch main
```

| Argument   | Beschreibung                                | Erforderlich |
| ---------- | ------------------------------------------- | ------------ |
| --url      | Die URL des Git-Remotes.                    | ✅            |
| --path     | Der lokale Pfad, in den geklont wird        | ✅            |
| --username | Der Benutzername für das Remote.            | ❌            |
| --password | Das Passwort für das Remote                 | ❌            |
| --branch   | Der zu klonende Branch (Standard ist main). | ❌            |

### push

Pusht zu einem Git-Remote. Das Repository muss zuerst geklont werden. Änderungen werden während des Push nicht gestaged.

```
psu git push --url http://github.com/ironmansoftware/psu.git --path C:\ProgramData\UniversalAutomation\Repository --username 'adamdriscoll' --password 'gh__1234123' --branch main
```

| Argument   | Beschreibung                                | Erforderlich |
| ---------- | ------------------------------------------- | ------------ |
| --url      | Die URL des Git-Remotes.                    | ✅            |
| --path     | Der lokale Pfad, in den geklont werden soll | ✅            |
| --username | Der Benutzername für das Remote.            | ❌            |
| --password | Das Passwort für das Remote                 | ❌            |
| --branch   | Der zu klonende Branch (Standard ist main). | ❌            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/de/config/psucli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
