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

# Send-PSUEvent

Send-PSUEvent envía datos de eventos o comandos remotos a una conexión de centro de eventos o a una sesión de ordenador conectada.

## SINOPSIS

Envía datos o comandos a un concentrador de eventos (event hub), un ordenador o un grupo de ordenadores.

## SINTAXIS

```powershell
Send-PSUEvent -Hub <String> [-ConnectionId <String>] [-Data <Object>] [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
Send-PSUEvent -Hub <String> [-ConnectionId <String>] [-Command <String>] [-Parameters <Hashtable>] [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
Send-PSUEvent -Computer <String> [-Data <Object>] [-ScriptBlock <ScriptBlock>] [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
Send-PSUEvent -Computer <String> [-Command <String>] [-Parameters <Hashtable>] [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
Send-PSUEvent -ComputerGroup <String> [-Data <Object>] [-ScriptBlock <ScriptBlock>] [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
Send-PSUEvent -ComputerGroup <String> [-Command <String>] [-Parameters <Hashtable>] [-Timeout <Int32>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
```

## DESCRIPCIÓN

Envía datos serializados o solicita la ejecución de un comando en los agentes conectados. Seleccione un centro de eventos con `-Hub`, un agente con `-Computer` o un grupo con `-ComputerGroup`. Para un agente, utilice `-ScriptBlock` para una invocación de script o `-Command` y `-Parameters` para un comando de módulo; estas opciones pertenecen a conjuntos de parámetros distintos. `-Timeout` es de 30 segundos de forma predeterminada. `Invoke-PSUCommand` es un alias.

## EJEMPLOS

```powershell
Send-PSUEvent -Hub 'MyHub' -Data @{ Name = 'Adam' }
Send-PSUEvent -ComputerGroup 'Build agents' -Command 'Get-Process' -Parameters @{ Name = 'pwsh' } -Timeout 30
```

## PARÁMETROS

| Parámetro                | Descripción                                                                                                            |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `-Hub`                   | Nombre del centro de eventos; los datos del evento van a todas las conexiones, a menos que se indique `-ConnectionId`. |
| `-ConnectionId`          | Envía a una conexión concreta del centro.                                                                              |
| `-Computer`              | Tiene como destino un ordenador conectado.                                                                             |
| `-ComputerGroup`         | Tiene como destino un grupo de ordenadores conectados.                                                                 |
| `-Data`                  | Objeto que se serializa y se envía a un centro o a un ordenador.                                                       |
| `-ScriptBlock`           | Script que se ejecuta en un ordenador o en un grupo de ordenadores.                                                    |
| `-Command`               | Comando de módulo que se ejecuta en un ordenador, un grupo o un centro.                                                |
| `-Parameters`            | Tabla hash de los parámetros que se pasan a `-Command`.                                                                |
| `-Timeout`               | Tiempo de espera del resultado, en segundos; el valor predeterminado es 30.                                            |
| `-ComputerName`          | URL del servidor PSU para una conexión de administración remota; alias: `-Uri`.                                        |
| `-AppToken`              | Token de aplicación para una conexión de administración remota.                                                        |
| `-Credential`            | Credenciales para la API de administración.                                                                            |
| `-UseDefaultCredentials` | Utilice las credenciales actuales de Windows para la conexión de administración.                                       |
| `-Integrated`            | Utilice el cliente de administración de PSU en proceso cuando el cmdlet se ejecute dentro de PSU.                      |
| `-TrustCertificate`      | Permite una conexión remota con un certificado TLS no confiable.                                                       |
| `-Cookies`               | Reutilice y conserve las cookies de autenticación en esta sesión de PowerShell.                                        |

## PERMISOS

El token de acceso requiere `apis.eventhubs/execute` para ejecutar este cmdlet de forma remota. Esto también se aplica cuando el comando tiene como destino un ordenador o un grupo de ordenadores.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/es/comandos-de-powershell/send-psuevent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
