Get-PSUVariable Value

Product: PowerShell Universal
Version: 3.9.4

Get-PSUVariable -Name “Var” is returning the value below. Are we supposed to use the DisplayValue
to get the actual value?

Value: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">_x000D__x000A_ <S>Dev</S>_x000D__x000A_</Objs>
[information] Id                  : 7 
[information] Name                : Environment 
[information] Value               : <Objs Version="1.1.0.1" 
[information]                       xmlns="http://schemas.microsoft.com/powershell/2004/04"> 
[information]                         <S>Dev</S> 
[information]                       </Objs> 
[information] UserName            : 
[information] Password            : 
[information] Secret              : False 
[information] Vault               : 
[information] Type                : System.String 
[information] CreatedTime         : 1/1/0001 12:00:00 AM 
[information] UpdatedTime         : 1/1/0001 12:00:00 AM 
[information] Description         : PSU environment type 
[information] MissingSecret       : False 
[information] DisableRunAsSupport : False 
[information] DeleteSecret        : False 
[information] ReadOnly            : True 
[information] Database            : False 
[information] DisplayValue        : Dev

PSU Stores its variables at XML. I guess the most correct way would be to convert .Value from XML?

Display value is just returning something we can display in the UI. You can deserialie the value using the PSSerializer class since it’s CliXml.

[PSSerializer]::Deserialize($Variable.Value)