ls env:\path |fl

ls env:\path |fl > save-path.txt

setx /M path %path%;C:\path\here\

To set the USER PATH instead of the system PATH, remove "/M".

 

Getting this wrong can screw up the system without recovery. So, some like to change via gui regedit:

User Variables: HKEY_CURRENT_USER\Environment
System Variables: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

 

Either restart the Powershell session or reboot the system for the changes to take effect.