Embrace and Extend the PowerShell ISE

I did a presentation today for the PowerShell Virtual Chapter of SQLPass. The recording will be posted later and I’ll update this when I have the link. But in the meantime, as promised, I wanted to make available my slide deck and demos. You’ll need to download the individual ISE Addons from the respective sites. Links are in the slides. You can use the script demos as guides for your own ISE extensions.

Download a PDF version of Embrace and Extend the PowerShell ISE.
Download ISEAddonDemoFiles.zip with my demo scripts.

Convert Aliases with the Tokenizer

Last week I posted a function you can use in the Windows PowerShell ISE to convert aliases to command definitions. My script relied on regular expressions to seek out and replace aliases. A number of people asked me why I didn’t use the PowerShell tokenizer. My answer was that because I’m not a developer and don’t think that way. But after working a bit with it I can see the value so I have another function you can use in the ISE to convert aliases to commands. Continue reading

PowerShell ISE Convert All Aliases

Yesterday I posted an article on how to convert a selected word to an alias or cmdlet. While I think there is still some value in this piecemeal approach. sometimes you want to make wholesale changes, such as when troubleshooting a script that someone else wrote that is full of cryptic aliases. I have a function you can integrate into the ISE that will convert all aliases in a block of selected text and convert them to their full cmdlet name equivalents. Continue reading

PowerShell ISE Alias to Command

Earlier this week I posted a function that you could incorporate into the PowerShell ISE to convert selected text to upper or lower case. I was challenged to take this a step further and come up with a way to convert aliases to commands. Which is exactly what I did. Continue reading

PowerShell ISE Case Closed

When writing a PowerShell script or function, things like indentations, white space and case make a big difference in how easy it is to read and understand your code. Sometimes it can be helpful to have a word or sentence in all upper case so that it stands out. Here is a simple set of commands you can insert into your PowerShell ISE profile to convert selected text to all upper or lower case. Continue reading