I have the name of an environment variable in a variable and I want to get the value. How do I do that? I\'ve tried:
PS C:\\Users\\Joe> $v=\"USERDOMAIN\"
To complement Vladimir's helpful answer with a solution that makes direct use of the .NET framework:
$v="USERDOMAIN" [Environment]::GetEnvironmentVariable($v)