<t>Changing the actual environment variables can be done by<br/>
using the env: namespace / drive information. For example, this<br/>
code will update the path environment variable:<br/>
<br/>
$env:PATH = "SomeRandomPath"; (replaces existing path) <br/>
$env:PATH += ";SomeRandomPath" (appends to existing path)<br/>
<br/>
```<br/>
<br/>
Making change permanent<br/>
<br/>
There are ways to make environment settings permanent, but<br/>
if you are only using them from PowerShell, it's probably<br/>
a lot better to use [Powershell *profiles*](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles) script.<br/>
<br/>
Everytime a new instance of Powershell starts, it look for specific script files (named *profile* files) and execute them if they do exist. You can edit one of these profile to customize your enviroment.<br/>
<br/>
To know where those *profile* scripts are located in your computer type:<br/>
<br/>
```<br/>
$profile <br/>
$profile.AllUsersAllHosts <br/>
$profile.AllUsersCurrentHost <br/>
$profile.CurrentUserAllHosts <br/>
$profile.CurrentUserCurrentHost <br/>
<br/>
```<br/>
<br/>
You can edit one of them, for example, by typing:<br/>
<br/>
```<br/>
notepad $profile<br/>
<br/>
```</t>