how to add a folder to your path from powershell permanently

PHOTO EMBED

Sat Feb 15 2025 19:11:15 GMT+0000 (Coordinated Universal Time)

Saved by @v1ral_ITS

$PathDirs = "C:\Users\imper\Desktop\mpv"
$NewPath = $PathDirs + ";" + [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)

[System.Environment]::SetEnvironmentVariable("Path", $NewPath, [System.EnvironmentVariableTarget]::Machine)
content_copyCOPY