I have one big batch script which sets bunch of environment variables.
I want to call that batch script from powershell, that way I can get benefits of both i.e. enviorment variable set by my script and powershell.
I have one big batch script which sets bunch of environment variables. I want
Share
The idea comes from this blog post: Nothing solves everything – PowerShell and other technologies
Here is my version of this script. It calls a batch file (or any native command) and propagates its environment:
UPDATE: Improved and better tested version of this script is here: Invoke-Environment.ps1
P.S. Here is the proposal to add similar capability to PowerShell: Extend dot sourcing concept to cmd files