Invoke-PSUCommand
Synopsis
Sends events to an event hub.
Syntax
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>]Description
Sends events to an event hub.
Parameters
-AppToken
The app token used when accessing the PowerShell Universal Management API.
-ComputerName
The URL or host name of the PowerShell Universal server.
-Data
The data to send to the client. This data will be serialized to CliXml and deserialized on the client.
-Hub
The name of the event hub to send the event to.
-Integrated
Uses the in-process management client when running inside PowerShell Universal.
-UseDefaultCredentials
Uses the current Windows credentials to connect to PowerShell Universal.
-ConnectionId
The connection ID to send the event to. If not specified, the event will be sent to all connected clients.
-Command
The command to run on the agent.
-Computer
The computer to run this command on.
-Credential
Credentials to login to the PowerShell Universal Management API.
-Parameters
A hashtable of parameters to send to the command.
-TrustCertificate
Whether the cmdlet should ignore certificate issues.
-Timeout
The timeout in seconds for the command to run.
Common parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
System.Object
Notes
Examples
Example 1
Sends an event to the MyHub event hub. All connected clients will receive the event.
PERMISSIONS
The access token requires apis.eventhubs/execute to run this cmdlet remotely. This also applies when the command targets a computer or computer group.
Last updated
Was this helpful?