> 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/es/comandos-de-powershell/invoke-psucommand.md).

# Invoke-PSUCommand

Invoke-PSUCommand envía eventos a un event hub o a un ordenador específico en PowerShell Universal, ejecutando opcionalmente un comando remoto.

### Sinopsis

Envía eventos a un event hub.

### Sintaxis

```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>]
```

### Descripción

Envía eventos a un event hub.

### Parámetros

#### -AppToken

No se utiliza.

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

#### -ComputerName

No se utiliza.

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

#### -Data

Los datos que se envían al cliente. Estos datos se serializarán a CliXml y se deserializarán en el cliente.

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

#### -Hub

El nombre del event hub al que se envía el evento.

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

#### -Integrated

No se utiliza.

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

#### -UseDefaultCredentials

No se utiliza.

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

#### -ConnectionId

El ID de conexión al que se envía el evento. Si no se especifica, el evento se enviará a todos los clientes conectados.

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

#### -Command

El comando que se ejecuta en el agente.

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

#### -Computer

El ordenador en el que se ejecuta este comando.

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

#### -Credential

Credenciales para iniciar sesión en la API de gestión de PowerShell Universal.

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

#### -Parameters

Una tabla hash de parámetros que se envían al comando.

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

#### -TrustCertificate

Si el cmdlet debe ignorar los problemas de certificado.

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

#### -Timeout

El tiempo de espera en segundos para la ejecución del comando.

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

#### Parámetros comunes

Este cmdlet admite los parámetros comunes: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable y OutVariable. Para más información, consulte [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Entradas

Ninguna

### Salidas

System.Object

### Notas

### Ejemplos

#### Ejemplo 1

```powershell
Invoke-PSUCommand -Hub 'MyHub' -Data @{ Name = 'Adam' }
```

Envía un evento al event hub MyHub. Todos los clientes conectados recibirán el evento.


---

# 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/es/comandos-de-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.
