PowerGUI Interactivity

There are many small nice things which I love about PowerGUI. One of them is its ability to transform every bit of interactivity present in PowerShell command-line into UI:

Prompts for parameters.

Prompts to confirm actions.

Prompts for mandatory parameters.

Error handling.

Our vision with PowerGUI has always been to give user as much information and interaction as we could get out of PowerShell.

Let’s see how command-line compares to UI for each of these items:

Prompts for parameters

In command-line, when you type in a cmdlet name, type -, and then use tab-completion to see all possible parameters.

New-Mailbox -

PowerGUI gives you a table with all parameters and associated help information:

Prompts to confirm actions

In command-line, you’ll get asked to confirm potentially risky operations:

[PS] C:\>Remove-Mailbox ps64.local/Users/user_name_420

Confirm
Are you sure you want to perform this action?
Removing the Mailbox “ps64.local/Users/user_name_420” will remove the Windows
user object and mark the mailbox in the database for removal.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is “Y”):

Same thing in PowerGUI:

Prompts for mandatory parameters

In command-line, if you omit a mandatory parameter you’ll get prompted to supply one:

[PS] C:\>New-Mailbox

cmdlet New-Mailbox at command pipeline position 1
Supply values for the following parameters:
Password:

Same thing in PowerGUI but all shown in one handy dialog box:

Error handling

PowerGUI even shows you exactly the same errors when something goes wrong.

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.