2005 2006 2007 2008 2009 2010 2011 2015 2016 2017 2018 aspnet azure csharp debugging docker elasticsearch exceptions firefox javascriptajax linux llblgen mongodb powershell projects python security services silverlight training videos wcf wpf xag xhtmlcss

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.