xxxxxxxxxx
To edit temporarily:
$env:Path = ($env:Path + "C:\bin") -join ';'
To edit permenantly/append to permenantly:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\bin", "Machine")
xxxxxxxxxx
$env:Path = "SomeRandomPath"; (replaces existing path)
$env:Path += ";SomeRandomPath" (appends to existing path)
xxxxxxxxxx
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\bin", "Machine")