Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9746

How do I set the environment variable from a batch file in PowerShell?

$
0
0

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.


Viewing all articles
Browse latest Browse all 9746

Trending Articles