Question: 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.

Answer: 
If you grab the [PowerShell Community Extensions](https://github.com/Pscx/Pscx), there is an Invoke-BatchFile command in it that runs the batch file but more importantly, it retains any environment variable modifications made by the batch file e.g.:

```
>Invoke-BatchFile 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat'
Setting environment for using Microsoft Visual Studio 2008 x86 tools.

```
You can run a batch script from Powershell just by putting its name, but that won't help you. Environment variables set in the batch script will only be visible from *that batch and anything that batch runs*. Once the control returns back to Powershell the environment variables are gone. You could have the batch script run `set` at the end and then parse its output into your PSH environment variables, though.