> 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/it/comandi-powershell/invoke-psuscript.md).

# Invoke-PSUScript

Invoke-PSUScript avvia un nuovo job per eseguire uno script all'interno di PowerShell Universal, restituendo un job di cui è possibile monitorare l'avanzamento e l'output.

## SINOSSI

Avvia un nuovo job di PowerShell Universal per uno script.

## SINTASSI

```powershell
Invoke-PSUScript -Script <Script> [-Environment <String>] [-Credential <Variable>] [-Wait] [-WaitTimeout <Int32>] [-Queue <String>] [-Parameters <Hashtable>] [-Tags <Tag[]>] [-Silent]
Invoke-PSUScript -Id <Int64> [-Environment <String>] [-Credential <Variable>] [-Wait] [-WaitTimeout <Int32>] [-Queue <String>] [-Parameters <Hashtable>] [-Tags <Tag[]>] [-Silent]
Invoke-PSUScript -Name <String> [-Environment <String>] [-Credential <Variable>] [-Wait] [-WaitTimeout <Int32>] [-Queue <String>] [-Parameters <Hashtable>] [-Tags <Tag[]>] [-Silent]
```

## DESCRIZIONE

Avvia un job che può essere monitorato tramite i cmdlet dei job. I parametri normali dello script vengono esposti dinamicamente. I parametri nascosti dello script non vengono deliberatamente esposti come parametri dinamici del cmdlet, ma possono essere forniti tramite la hashtable `-Parameters` e vengono passati allo script.

## ESEMPIO

```powershell
Invoke-PSUScript -Name 'Deploy.ps1' -Parameters @{ Region = 'westus'; InternalToken = $token }
```

## PARAMETRI

* **Parameters**: hashtable dei valori dei parametri dello script, inclusi i parametri nascosti dello script.
* **Wait**: attende il completamento.
* **WaitTimeout**: tempo di attesa massimo in secondi.


---

# 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/it/comandi-powershell/invoke-psuscript.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.
