Cannot create Integer variables

Product: PowerShell Universal
Version: 5.3.2

I am fairly new to PowerShell Universal, so this is my first attempt to do this. I was able to create strings, credentials and secrets, but cannot create “simple” integer variables.

I click on “Create Variable” and the first thing I do is change the Type to “Integer” and immediately this error pops up. The error also pops up if I input some integer value into the text box first and then change the value.

I can work around by using New-PSUVariable for now, still would like to know if I do something wrong…


I was able to extract the error message from the DOM:
“An error occured. Unable to set property ‘type’ on object of type ‘AntDesign.Input`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]’. The error was: Unable to cast object of type ‘System.String’ to type ‘AntDesign.InputType’.”

Have you tried editing the variables.ps1 file directly to add your variable to see if that works?

Yes, “I can work around by using New-PSUVariable for now, […]”
Still, this should also work in the UI?

I agree. I was just asking if it worked that way as well, since that can be done through the web UI as another workaround until the issue is fixed. I didn’t know if you were saying that you executed the cmdlet outside of PSU (like from your workstation or through VS Code), to create the variable(s), hence why I asked about editing the variables.ps1 file directly.

If you haven’t created an issue on the GitHub repo yet, I’d recommend doing so.

This seems to be fine in 5.5.4 :+1: