PowerShell Script Encrypter

We frequently get questions asking, “Where can I get a PowerShell script encoder so I can write secure scripts like the Visual Basic Script Encoder?” The answer is that it is impossible to hide the password from the user if the script ever needs it. This is true of PowerShell, VBScript, C#, C++, Assembly, or any other language. There will always be some point when your script has reversed all of the encryption / protection mechanisms, giving the “attacker” complete access to it.

Scripting WinDbg with PowerShell

The WinDbg module lets you script and automate WinDbg sessions from PowerShell.

PowerShell P/Invoke Walkthrough

In version 1 of PowerShell, it was possible to access Win32 APIs in one of two ways: by generating a dynamic assembly on the fly (you wouldn’t really do this for one-off calls, but would probably do it in a script that makes it easier to invoke Win32 APIs,) or by looking up the P/Invoke definition for that API call, and compiling in-line C# to access it. These are both good approaches, but we wanted to use the Add-Type cmdlet to really nail the language interop scenarios for PowerShell V2.

DateTime Casts are Language Primitives

One thing that sometimes comes as a surprise (most recently as a comment on the PowerShell blog) is that DateTime casts are always parsed in the en-US DateTime format: Casting to a DateTime object doesn’t respect the current culture of the thread. For example: > [Threading.Thread]::CurrentThread.CurrentCulture LCID Name -— —- 2057 en-GB > [DateTime] “01/02/03” 02 January 2003 > # Note US date interpretation. This is an explicit design goal.

Should I Refinance? PowerShell the Financial Advisor

When it comes to personal finance, research and reading sometimes can’t answer all of your questions. Especially when it comes to projecting the future, many subtle factors are simply too difficult to easily describe in rules of guidance. Because of this, they tend to be ignored. With interest rates sinking, now’s a good time to evaluate a mortgage refinance. The online calculators help you figure out if it’s right for you, but they all miss important facts.

Showing Calendars in your OOF Messages

The Outlook team has a tradition of putting calendar diagrams in their OOF messages to try and help clarify the date ranges. In a recent mail to an Outlook-heavy DL, about 50% of the OOF messages I got back contained these mini OOF calendars, so they must find them helpful. I asked if it was a new-fangled feature in O14, but in fact they do it by hand! (I wonder if they book vacation time for hand-crafting the OOF message.

How to get PowerShell Swag

Once you get passionate enough about PowerShell to start looking for swag, you know you have a problem. Unfortunately, there is very little available in that regard. If you haven’t seen /n Software’s sticker yet, here’s a bunch of people that picked one up while the promo was live. I haven’t seen anything calling out the end to the promo, but the page generates an error when you visit now.

Introduction to PowerShell Presentation

Once you’ve been using PowerShell for awhile, it’s natural to want to spread the word. We frequently get questions asking for a standard “Introduction to PowerShell” slide deck, but haven’t really had one to share. The problem is that they tend to be pretty customized to the audience – even a “standard intro talk” becomes much more engaging when you target it to a specific audience. However, those customizations tend to be centered around specific themes, so I’ve reduced a recent presentation to its core and attached it here.

Supporting Additional View Details

A question came up on an internal discussion list today about how to let a cmdlet support both simple and detailed views. For example, a –Detailed flag to tell the cmdlet to emit additional information during the request. The original approach was to do all of this filtering inside of the cmdlet. When –Details is not specified, run through some additional code to remove the extraneous properties. The goal is noble, but the implementation decision is misguided.

Solo Long Cross-Country

One of the biggest accomplishments in getting your private pilot’s license is the “Solo Long Cross-Country.” It marks the home-stretch of a lot of training, practice maneuvres, landing drills, and solo flights of increasing complexity. This flight is where it all comes together: 150 nautical miles total, landing at a minimum of 3 airports, with one leg at least 50 nautical miles. I planned this flight as a tour of the San Juans and airports I have never been.