Code, PowerShell Paul Fulbright Code, PowerShell Paul Fulbright

Initial Response...

Retrieving and setting Environment variables in Powershell.

Get:
.\ Get-ChildItem Env:
$Env:Temp

Set:
Process Level:
$Env:TEMP = "C:\Windows\Temp"

User/Machine Level:
[Environment]::SetEnvironmentVariable("Temp", "Test value.", "User")
Environment]::SetEnvironmentVariable("Temp", "Test value.", "Machine")

Delete:
[Environment]::SetEnvironmentVariable("Temp", $null, "User")

Read More