Agent
Information about PowerShell Universal agents.
Last updated
Was this helpful?
Information about PowerShell Universal agents.
Last updated
Was this helpful?
The PowerShell Universal Agent is used to provide the Event Hub feature to remote clients. You can learn more about installing the agent on our .
After installing the agent, you will need to configure the client by using an agent.json
file.
This JSON file configures the Agent to connect to the hub and run scripts when invoked.
The system location of agent.json
is in $ENV:ProgramData\PowerShellUniversal
.
The user specific location of agent.json
is in $ENV:AppData\PowerShellUniversal.
The below options can be included in the agent.json
file.
These are the connections to Event Hubs. Each connection can contain it's own URL, hub, authentication and script to execute.
The URL of the PowerShell Universal service.
The name of the Event Hub.
The app token used to authentication against the hub.
Windows Authentication will be used to authenticate against the hub.
The script to execute when an event is received. This script is read into memory and not from disk. Variables such as $PSScriptRoot
are currently not supported. This is optional as event hubs can also run commands directly.
Environment variables can be used to configure various operational settings for the agent.
PSU_AgentLogLevel
Sets the log level for the agent service.
Information
PSU_Connections__0__Url
The URL of the PowerShell Universal service.
PSU_Connections__0__Hub
The name of the Event Hub to connect to.
PSU_Connections__0__AppToken
The app token used to connect to an authenticated hub.