PowerShell Virtualenv

PowerShell is epic and the ISE is awesome, but for some reason ISE shares variable state between tabs. No idea.

So, if you look at any of the hundreds of utilities I've written, you'll notice that I always wrap my entire PowerShell ps1 in a $virtualenv block:

$virtualenv = {


\#++ content here; don't even bother indenting


}
&$virtualenv

The name comes from the virtualenv Python tool, which makes sure modules are install in a local isolated virtual environment, not on your system as a whole.

Now this script is scoped. All work will be done inside this virtualenv.