I need to set the environment variable from a batch file. In Linux, I could use this:
source key.sh
How do I do this in PowerShell? When I ran key.bat
, it gave an error. I ran .\key.bat
and it set the variable, but it doesn't show when I run $env:KEY
.