On Linux, I can do:
$ FOO=BAR ./myscript
to call "myscript" with the environment variable FOO being set.
Is something similar possible in Powershell, i.e. without having to first set the variable, call the command, and then unset the variable again?
To be more clear about my use case - I don't want to use this as part of a script. Rather, I have a third party script whose behavior I can control using environment variables, but, in this case, not command line arguments. So being able to alternate between typing
$ OPTION=1 ./myscript
and
$ ./myscript
would just be very handy.