---
type: note
tags: [share, cli, terminal, windows, powershell, path, user, environment, variable, note]
created: 2025-11-09T17:38:41.653Z
updated: 2025-11-15T20:19:57.208Z
---# add path to environment variable via powershell

$path = [Environment]::GetEnvironmentVariable("PATH", "User")
$appPath = "C:\Program Files\MyApp"
if ($path -notlike "*$appPath*") {
    [Environment]::SetEnvironmentVariable("PATH", "$path;$appPath", "User")
}

## Links

- [share link to this card](https://fastdesk2.lovable.app/share/5fdf0711-e4b1-48d2-9d2d-46773b2343a8)


---
**Keywords:** share, cli, terminal, windows, powershell, path, user, environment, variable, note
