PowerShell Editor Is Slow Starting Up When You Are Browsing Code? Speed It Up to Instant! |
![]() |
![]() |
PowerShell | |
Written by Darwin Sanoy | |
Wednesday, October 16, 2013 1:14pm | |
Dedicated PowerShell ISEs and IDEs all seem to be slow starting up. Some are worse than others, but they are all painfully slow compared to good old notepad. For code peeking we've got somethat is even faster than notepad!
Whether you use the PowerShell ISE, Admin Script Editor (ASE), Idera's PowerShell Plus, PowerGUI, PowerSE, Primal Script or any of the others - they all take significant time to wake up and smell the coffee! One of the daily uses of a code editor is to take a peek at code when you are looking for a few lines you remember using in the past. For this specific operation we've got something that even faster than Notepad - it's instant. The following PowerShell oneliner configures Windows Explorer's built in Plain Text viewer to be the default viewer for all PowerShell file types including scripts (.ps1) and modules (.psm1).
Unfortunately if you install a new PowerShell editor it may update the file type association of some of these files and the viewer support stops working. If that happens, simple re-run the below snippet to re-register the plain text viewer. A second example below shows how to enable it for VBS, CMD, BAT, REG and XML. You can add the extension of any file type that is internally "plain text". #PowerShell File Types
For editing your scripts you can also make your editor nearly instant by changing your approach to Integrated Script Development Environments - think of them like Outlook - open it once and leave it open all day! |