Product: PowerShell Universal
Version: 5.5.4
I’m trying to replicate the example from the video at PowerShell Universal v5 - PowerShell Universal Agents
I have installed the Agent on the same machine as I have the requirement to use gMSA for everything but with different users, so I figured that using the agent is actually the best way to achieve that.
I am using HTTPS with a valid certificate (not self-signed!) for the PSU Server - this is my agent.json
{
"Connections": [
{
"Url": "https://myPSUServer.example.com",
"Hub": "Agent-Dns",
"AppToken": "...",
}
],
"Universal": {
"Agent": {
"Tags": [ "DNS" ]
}
}
}
So far I have succeeded in creating an Event Hub and the agent seems to be connected to the PSU Server.
However, when I try to run my EventHub.ps1
:
Invoke-PSUCommand -Hub "Agent-Dns" -Command "Out-File" -Parameters @{
FilePath = "D:\work\test.txt"
InputObject = "Hello, World!"
}
using “Run Script” in the Integrated environment, I get an error:
The SSL connection could not be established, see inner exception.
at <ScriptBlock>, D:\UniversalAutomation\Repository\DevTest\70889\EventHub.ps1: line 1
at <ScriptBlock>, <No file>: line 1
I tried changing the connection to HTTP only using -ComputerName "http://myPSUServer"
, but here I also get an error:
Unauthenticated. Specify an app token, credentials, use default credentials or enable permissive security model.
at <ScriptBlock>, D:\UniversalAutomation\Repository\DevTest\70889\EventHub.ps1: line 1
at <ScriptBlock>, <No file>: line 1
I also created a Token, stored it as secret variable and tried passing it via the -AppToken
parameter, but the result unfortunately is the same (I have verified that the token is actually read from the variable).
I have added
"Api": {
"SecurityModel": "Permissive"
}
to my appsettings.json, however that does not seem to have any effect.
I am thinking that there must be some major difference in how the Verb-PSUSomething
commands behave in my installation as in all the examples I find there is no real need to specify the ComputerName and authentication parameters?