Get and set-PSUvariable woes

I’m trying to get and/or set a variable with a script, but I’m not having much luck.

the cmdlet docs arent really updated ( universal-docs/Get-PSUVariable.txt at master · ironmansoftware/universal-docs · GitHub), and the docs doesnt mention the cmdlets

I’ve got a simple Variable “VarTest” and in my script (integrated environment) this line:

Get-PSUVariable -Name VarTest -Integrated -UseDefaultCredentials

the script returns " [error] Failed to query.NotFound "

Product: PowerShell Universal
Version: 2.8.1

oh, maybe this is related to Variables are not working in the Integrated environment · Issue #646 · ironmansoftware/issues (

I think you might need to try not using Integrated mode.

Connect-PSUServer -ComputerName http://localhost
Set-PSUVariable -Name VarTest -Value Cool -UseDefaultCredentials
Get-PSUVariable -Name VarTest -UseDefaultCredentials

hmm, not having much luck
Feb 17, 2022 7:57 PM [error] Response could not be deserialized to JSON: GET

Got around it by dumping the data with Export-CMLIXML to a file. But it would be nice to use variables instead.