> 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/send-psuevent.md).

# Send-PSUEvent

## SINOSSI

Invia eventi a un hub eventi.

## SINTASSI

### ScriptHub (predefinito)

```
Send-PSUEvent -Hub <String> [-ConnectionId <String>] [-Data <Object>] [-Timeout <Int32>]
 [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials]
 [-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]
```

### ScriptComputer

```
Send-PSUEvent -Computer <String> [-Data <Object>] [-Timeout <Int32>] [-ComputerName <String>]
 [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate]
 [-Cookies] [<CommonParameters>]
```

### ModuleComputer

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

### ModuleHub

```
Send-PSUEvent -Hub <String> [-ConnectionId <String>] [-Command <String>] [-Parameters <Hashtable>]
 [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>]
 [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]
```

## DESCRIZIONE

Invia eventi a un hub eventi.

## ESEMPI

### Esempio 1

```powershell
PS C:\> Send-PSUEvent -Hub 'MyHub' -Data @{ Name = 'Adam' }
```

Invia un evento all'hub eventi MyHub. Tutti i client connessi riceveranno l'evento.

## PARAMETRI

### -AppToken

Non utilizzato.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ComputerName

Non utilizzato.

```yaml
Type: String
Parameter Sets: (All)
Aliases: Uri

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Data

I dati da inviare al client. Questi dati verranno serializzati in CliXml e deserializzati sul client.

```yaml
Type: Object
Parameter Sets: ScriptHub, ScriptComputer
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Hub

Il nome dell'hub eventi a cui inviare l'evento.

```yaml
Type: String
Parameter Sets: ScriptHub, ModuleHub
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Integrated

Non utilizzato.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -UseDefaultCredentials

Non utilizzato.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ConnectionId

L'ID della connessione a cui inviare l'evento. Se non specificato, l'evento verrà inviato a tutti i client connessi.

```yaml
Type: String
Parameter Sets: ScriptHub, ModuleHub
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Command

Il comando da eseguire sull'agente.

```yaml
Type: String
Parameter Sets: ModuleComputer, ModuleHub
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Computer

Il computer su cui eseguire questo comando.

```yaml
Type: String
Parameter Sets: ScriptComputer, ModuleComputer
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Credential

Credenziali per accedere all'API di gestione di PowerShell Universal.

```yaml
Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Parameters

Una hashtable di parametri da inviare al comando.

```yaml
Type: Hashtable
Parameter Sets: ModuleComputer, ModuleHub
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -TrustCertificate

Indica se il cmdlet deve ignorare i problemi relativi ai certificati.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Timeout

Il timeout in secondi per l'esecuzione del comando.

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Cookies

Riutilizza e mantiene i cookie di autenticazione per la sessione PowerShell corrente.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable e -ProgressAction. Per ulteriori informazioni, veda [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUT

### Nessuno

## OUTPUT

### System.Object

## NOTE

## COLLEGAMENTI CORRELATI


---

# 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/send-psuevent.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.
