I want to use variables over PowerShell instances away. (I know that global variables are not nice) Is this the best way to define a variable over instances in PowerShell? Other ideas? ($global:variable is not over PowerShell instances away)
[Environment]::SetEnvironmentVariable("TestVariable", "Test value.", "User")
[Environment]::GetEnvironmentVariable("TestVariable","User")