Refresh the environment. Reload environment variables every time you want environment changes to propagate, so you do not need to restart the console after setting a new variable. A better alternative to the chocolatey refreshenv. for cmd, bash, powershell and zsh.
Value before reloading:
C:\Users\torocat-virtual-pc\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\windowsapps\microsoft.powershell_7.4.4.0_x64__8wekyb3d8bbwe\Modules;C:\Users\torocat-virtual-pc\scoop\modules;C:\Users\torocat-virtual-pc\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
Value after reloading:
C:\Users\torocat-virtual-pc\scoop\modules;C:\Users\torocat-virtual-pc\Documents\WindowsPowerShell\Modules
Value before reloading:
C:\Users\torocat-virtual-pc\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\windowsapps\microsoft.powershell_7.4.4.0_x64__8wekyb3d8bbwe\Modules;C:\Users\torocat-virtual-pc\scoop\modules;C:\Users\torocat-virtual-pc\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
Value after reloading:
C:\Users\torocat-virtual-pc\scoop\modules;C:\Users\torocat-virtual-pc\Documents\WindowsPowerShell\Modules
@badrelmers