Skip to content

Terminal

PATH

Add to User PATH

[System.Environment]::SetEnvironmentVariable("Path", $env:Path + ";full/path/here", [System.EnvironmentVariableTarget]::User)

Danger

Semicolon before full path is required.

Add to System PATH

This requires elevated shell.

[System.Environment]::SetEnvironmentVariable("Path", $env:Path + ";full/path/here", [System.EnvironmentVariableTarget]::Machine)