https://stackoverflow.com/a/51789626

Easiest way, use Chocolatey (freeware). It works for both CMD and PowerShell. Then you will be able to reload PATH (with variable expansion) with a simple command:

refreshenv

https://docs.chocolatey.org/en-us/create/functions/update-sessionenvironment?