Updating path

Environment Variable Target]:: User ) ### from comments ### ### Usage from comments - Add to the system environment variable ### [Environment]:: Set Environment Variable("Path", $env: Path "; C:\bin", [Environment Variable Target]:: Machine) Although the current accepted answer works in the sense that the path variable gets permanently updated from the context of Power Shell, it doesn't actually update the environment variable stored in the windows registry.

Note the ordering of the paths may change so that it’s in alphabetical order, so make sure you check the whole line, to make it easier, you can split the output into rows by using the semi-colon as a delimeter: ($env:path).split(“;”) Thank you for your interest in this question.

Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

I had a requirement today where I needed to install from source in a custom location (/opt/node) on an ubuntu host.

Compiling it from source on the target hosts (though not the ideal way to go about things), wasn't a problem at all - and everything went smoothly.

Thus, one has that path already before editing the file..bash_profile is used only by the login shell.