On Linux, I can do:
$ FOO=BAR ./myscript
to call \"myscript\" with the environment variable FOO being set.
Is something similar pos
2 easy ways to do it in a single line:
$env:FOO='BAR'; .\myscript; $env:FOO='' $env:FOO='BAR'; .\myscript; Remove-Item Env:\FOO
Just summarized information from other answers (thank you folks) which don't contain pure one-liners for some reason.