Go to ...

RSS Feed

PowerShell ISE – PS on steroids


Always when talking with PowerShell users, I am surprised to learn how only few of them are using the PowerShell ISE version. For me, it belongs to my favorite native Windows tools, because it’s a flexible and versatile front-end for PowerShell.

The following quotation comes from the official Microsoft PowerShell ISE documentation:

The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell. In the ISE, you can run commands and write, test, and debug scripts in a single Windows-based graphic user interface. The ISE provides multiline editing, tab completion, syntax coloring, selective execution, context-sensitive help, and support for right-to-left languages.

I especially like two features in PS ISE, the Command Add-on to help me enter correct command syntax, and the integrated Script Editor.

PS ISE Command Add-on

The Command Add-on lists all available PowerShell modules and their cmdlets. This is very practical if you are unsure about the syntax. Using a simple example, let’s mount and dismount a Windows image. I select the DISM module, then select the Mount-WindowsImage cmdlet, add the required information (image path, index, mount folder path), click Run, and the command is inserted into PS, and run. If I select Insert instead of Run, the command is inserted into PS but not run, allowing me to check and edit if needed:

Click screenshots to view enlarged in a new tab.

Couldn’t be easier. I don’t have to remember all the many PS cmdlets and their switches and options, I simply use the Command Add-on to enter my commands.

As I only mounted the image for screenshots, I can now dismount it in the same way, selecting the correct cmdlet and relevant options in the Command Add-on:

The Command Add-on can be toggled ON / OFF from the View menu:

PS ISE Script Editor

Writing, testing, editing and running PS scripts is easy using PS ISE. You can either open a script from the File menu, or simply copy a script from another application or webpage and paste it into the editor. The small arrowhead at the top top right shows / hides the editor:

To run the script, just press F5 or select Run from the Debug menu:

To make script output more visible, you can hide the editor before running the script:

That’s it. I just wanted to give a short introduction to, in my opinion, an excellent but underrated native Windows tool. I hope you’ll check out, and start using PS ISE soon.

Kari

 

 

 

 

Author: Kari Finn

A former Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.

Leave a Reply