> 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-psucommand.md).

# Invoke-PSUCommand

### Sinossi

Invia eventi a un hub eventi.

### Sintassi

```powershell
Invoke-PSUCommand [-AppToken <String>] [-ComputerName <String>] [-Data <Object>] -Hub <String> [-Integrated] [-UseDefaultCredentials] [-ConnectionId <String>] [-Credential <PSCredential>] [-TrustCertificate] [-Timeout <Int32>] [<CommonParameters>]

    Invoke-PSUCommand [-AppToken <String>] [-ComputerName <String>] [-Data <Object>] [-Integrated] [-UseDefaultCredentials] -Computer <String> [-Credential <PSCredential>] [-TrustCertificate] [-Timeout <Int32>] [<CommonParameters>]

    Invoke-PSUCommand [-AppToken <String>] [-ComputerName <String>] -Hub <String> [-Integrated] [-UseDefaultCredentials] [-ConnectionId <String>] [-Command <String>] [-Credential <PSCredential>] [-Parameters <Hashtable>] [-TrustCertificate] [-Timeout <Int32>] [<CommonParameters>]

    Invoke-PSUCommand [-AppToken <String>] [-ComputerName <String>] [-Integrated] [-UseDefaultCredentials] [-Command <String>] -Computer <String> [-Credential <PSCredential>] [-Parameters <Hashtable>] [-TrustCertificate] [-Timeout <Int32>] [<CommonParameters>]
```

### Descrizione

Invia eventi a un hub eventi.

### Parametri

#### -AppToken

Non utilizzato.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -ComputerName

Non utilizzato.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      Uri
Accept wildcard characters?  false
```

#### -Data I dati da inviare al client. Questi dati verranno serializzati in CliXml e deserializzati sul client.Required?                    falsePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-HubIl nome dell'hub eventi a cui inviare l'evento.Required?                    truePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false    -Integrated \[\<SwitchParameter>]        Not used.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false    -UseDefaultCredentials \[\<SwitchParameter>]        Not used.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-ConnectionIdL'ID di connessione a cui inviare l'evento. Se non specificato, l'evento verrà inviato a tutti i client connessi.Required?                    falsePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-CommandIl comando da eseguire sull'agent.Required?                    falsePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-ComputerIl computer su cui eseguire questo comando.Required?                    truePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-CredentialCredenziali per accedere all'API di gestione di PowerShell Universal.Required?                    falsePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-ParametersUna hashtable di parametri da inviare al comando.Required?                    falsePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false    -TrustCertificate \[\<SwitchParameter>]        Whether the cmdlet should ignore certificate issues.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false-TimeoutIl timeout in secondi per l'esecuzione del comando.Required?                    falsePosition?                    namedDefault value                NoneAccept pipeline input?       FalseAliases                      noneAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).InputNessunoOutputSystem.ObjectNote--------------------------> Esempio 1 --------------------------PS C:\\> Invoke-PSUCommand -Hub 'MyHub' -Data @{ Name = 'Adam' }Sends an event to the MyHub event hub. All connected clients will receive the event.


---

# 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-psucommand.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.
