Running the following command with a token generated for an Administrator account, with full access to all resources within PSU, is resulting in errors but running the script manually (not via Invoke-PSUScript with the exact same user account the token is for works without an issue.
PS C:\Users\Administrator> Invoke-PSUScript -Script 'Mist/PLC - Get Mist Clients.ps1' -TrustCertificate -AppToken "<redacted>" -ComputerName "<redacted>" Invoke-PSUScript: Cannot retrieve the dynamic parameters for the cmdlet. Object reference not set to an instance of an object.
The same error is received when using Connect-PSUServer with the same token, rather than specifying this all in the Invoke-PSUScript command, too.
Am I doing something wrong or is this a bug?
Product: PowerShell Universal Version: 5.0.7
Recommended Answer
Disregard. It seems that PSU’s support for using either forward OR back -slash in a path (e.g., "Mist/PLC - Get Mist Clients.ps1" versus "Mist\PLC - Get Mist Clients.ps1") was removed in 5.0, and it now only seems to support \ (back-slash). Changing the path accordingly resolved the error.
Disregard. It seems that PSU’s support for using either forward OR back -slash in a path (e.g., "Mist/PLC - Get Mist Clients.ps1" versus "Mist\PLC - Get Mist Clients.ps1") was removed in 5.0, and it now only seems to support \ (back-slash). Changing the path accordingly resolved the error.