All posts filed under: Fun

PowerShell ISE fun

Can you imagine how I could have got this output in PowerShell ISE? Any guess? @bielawb on twitter replied with the following code:

While this is technically the right way, this is not how I got the output you see here. The way I did: well, I just used PowerShell ISE object events. This post is just one of those funny ones. But, this post does show you how to use PowerShell ISE Object model. So, don’t get upset after you see the solution 😉 The trick here is to use the PowerShell ISE Object model and PowerShell ISE events. Here is the code:

This is it. Copy / Paste the above snippet to PowerShell ISE and run it. After that, just start typing at the PowerShell ISE console 🙂 Here is a video which shows this in action: httpvh://