echo windows environment variables powershell code example
Example 1: how to get environment variables in powershell
#Windows Powershell
cd Env:
Get-ChildItem
Example 2: powershell environment variables set
$Env:<variable-name> = "<new-value>"
#Windows Powershell
cd Env:
Get-ChildItem
$Env:<variable-name> = "<new-value>"