Watch the video:
Timestamps:
0:00 - Explanation & What is PATH
0:39 - Check PATH
1:00 - How to restore PATH/Environment Variables
1:15 - Restore PATH using an existing CMD/PowerShell/Terminal window
2:08 - Restore PATH using Process Explorer
3:33 - Restore PATH
4:28 - Restore any Environment Variable
Working with PATH or other environment variables and end up clearing or deleting something you shouldn’t have? This simple video shows you how to easily restore PATH or other environment variables on your computer! By the end, you should return to where you were before the mistake.
Check PATH commands:
[Environment]::GetEnvironmentVariable(“Path”, [System.EnvironmentVariableTarget]::User)
[Environment]::GetEnvironmentVariable(“Path”, [System.EnvironmentVariableTarget]::Machine)
Process Explorer: https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer