March 26
Check out this blog post from the Powershell Team. It shows how you can make variables in Powershell behave as global static properties. Be sure to grab the New-ScriptVariable script.
Note that it uses the Add-Type cmdlet available in Powershell 2.0. If you don't have version 2.0 then Add-Type can be replaced with
my New-CAssembly script. It's a really easy conversion. In fact I already converted it and is available from my
SkyDrive.