I would like to write some scripts on powershell, it involve using the environment variable on windows
here is the example of the script
test.ps1
setX number 456
echo $env:number
I found that $env:number cannot be updated immedately on the same session of powershell prompt. I need to reopen the powershell prompt. However, this would break my scripts How can i update the env variable immedately? In linux it is easy to do with EXPORT command, but for windows, it is a hazard...