> 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/apps/static-apps.md).

# Statische Apps

Statische PowerShell Universal-Apps erfordern zum Ausführen keinen PowerShell Universal-Server. Sie können auf einfachen Webservern wie Azure Blobs oder in IIS direkt aus dem Dateisystem gehostet werden. Sie bestehen aus dem PowerShell Universal App JavaScript-Framework und einer Reihe von JSON-Dateien, die während des Veröffentlichungsvorgangs erstellt werden. Statische Apps unterstützen die interaktiven Funktionen von PowerShell Universal nicht. Sie unterstützen jedoch das Ausführen von JavaScript.

## Erstellen einer statischen App

Das `Publish-PSUStaticApp`-Cmdlet ist für das Erstellen einer App verantwortlich. Sie können in der Definition Standard-App-Cmdlets verwenden. Zum Beispiel würde das Folgende eine App im Ausgabeordner mit einer einzelnen UDRating-Komponente erstellen.

```powershell
Publish-PSUStaticApp -Definition { 
    New-UDApp -Content { 
       New-UDRating -Max 10 
    } 
} -DestinationPath .\output -Force 
```

Sie können auch überall dort JavaScript-Aufrufe in Ihre App einführen, wo ein Endpunkt verwendet werden kann. Zum Beispiel im `-OnChange`-Parameter von `New-UDRating`. Die data-Variable enthält die Daten aus dem Event.

```powershell
Publish-PSUStaticApp -Definition {
   New-UDApp -Content {
      New-UDRating -Max 10 -OnChange (New-UDEndpoint -JavaScript 'alert(data)') 
   } 
} -DestinationPath .\output -Force 
```

## Veröffentlichen einer statischen App

Statische Apps können auf jedem Webserver veröffentlicht werden, der HTML-, JavaScript- und CSS-Dateien bereitstellen kann. Sie müssen den gesamten Inhalt des Ausgabeordners veröffentlichen, damit die App funktioniert.

## Einschränkungen

### Keine App-Interaktion

Sie können außer JavaScript keine interaktiven Funktionen von PowerShell Universal Apps verwenden. Dazu gehören unter anderem:

* Modals und Toasts
* -UDElement-Cmdlets
* Datenanbieter wie $Cache und $Session

### Keine PowerShell-Host-Interaktion

Während der Erstellung der App werden alle Skriptblöcke innerhalb der App ausgeführt, anstatt bei Bedarf ausgeführt zu werden, wie es beim Hosting in PowerShell Universal der Fall ist. Das bedeutet, dass Befehle wie `Write-Host` und `Write-Error` während der Erstellung und nicht während der Ausführung der App im Browser erfolgen. Das Folgende wird ebenfalls sofort ausgeführt:

* `Read-Host`
* `PromptForChoice`
* `Get-Credential`

### Eingeschränkte Steuerelement-Unterstützung

Obwohl es möglich ist, jedes Steuerelement zu verwenden und das JavaScript für dessen Interaktion anzugeben, wird dies aufgrund der Komplexität nicht empfohlen. Zu den Steuerelementen, die vermieden werden sollten, gehören:

* Data Grid
* Dynamic Region
* Protect Section


---

# 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/apps/static-apps.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.
