Entering $env:path
at the prompt correctly returns:
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;...
Entering $env:Path -split ';'
at the prompt correctly returns:
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
...
Entering doskey envpath=$env:Path -split ';'
at the prompt causes some pretty weird stuff that I've asked elsewhere about cleaning up, but among other things appears to evaluate $env:Path
at the time I'm defining the macro.
However the desired result is for it to evaluate $env:Path
later, at the time I'm running the macro. How do I create a macro to do that?