PowerShell tips and tricks.
Whenever I learn something new in PowerShell, I record it here, so that later, not only I but you also can find it and benefit.
Thursday, July 19, 2012
Auto-Indenting in PowerShell ISE
Just learned a very amazing thing about the PowerShell ISE (including from PS2)! If one selects multiple lines, then pressing tab will indent them all. Pressing shift+tab will un-indent them all.
This is so wonderful! I don't know how many times over the last year I added an if or try block, and I either manually spaced all the lines or just left it alone. Now, it takes two seconds, and my code looks amazing!