Given this file
Set-Location C:\
If I run it
.\foo.ps1
It will change the directory in the script. However once the script is finished the parent console directory has also been changed. Can Set-Location
be called in such a way as to affect only the running script?