PowerShell v3 – ISE Commands Add-on

*****Warning. This is from a preview release******

PowerShell ISE in v2 allowed you to create your own custom menu items via PowerShell script (a good example can be found on the Hey Scripting Guy blog)

PowerShell ISE in v3 ships with an Add-on built in called Commands. This Add-on places (by default) a Commands entry in the Add-on Tools Pane as below:

This Add-on is a very useful learning and reference tool since it provides access to help info for cmdlets and will help you add the necessary parameters you are looking for.

If you have many PowerShell modules in your system, you can filter the list by Module or by name:

Filtering by the Microsoft.PowerShell.Core Module:

Filtering by name, Get-H:

Once you have found the cmdlet you are looking for, many of them will contain parameter options:

You can access the help from the ? button, from which a searchable Help window will appear. You can scroll up or down to read all of it, or use the search to skip directly to a phrase:

In the parameters section fill out some of the options, then you can either Run the command directly from the pane or Insert the command into the Command Pane.

Give it a try out and see what you think.

Update:

Since writing this post, I noticed a new cmdlet Show-Command in the v3 preview. This will give you similar functionality to the Commands Add-on in the ISE.


Show-Command

You can also skip straight to the cmdlet you are interested in:


Show-Command -Name Get-Service

 

7 thoughts on “PowerShell v3 – ISE Commands Add-on

  1. $psISE.Options.ShowCommandsOnStartup no longer works using Powershell 5.0 but you can disable the Commands tab (aka Command Add-on) using $psISE.PowerShellTabs[0].ShowCommands = $false

  2. Yea but recently is has become very unstable, meaning, sporadically working to not working at all.

    Example:
    PS C:\Scripts\PoSH> Show-Command
    Show-Command : Exception has been thrown by the target of an invocation.
    At line:1 char:1
    + Show-Command
    + ~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Show-Command], TargetInvocationException
    + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Microsoft.PowerShell.Commands.ShowCommandCom
    mand

    I was all well as good until I installed the new AsureRM stuff (which hiccupped during the install and I had to start it again) and now the AddOn does show up as a tab, but it is blank and no way I can find to reinitialize it to get it back. Other than flattening the whole system and rebuilding form scratch on WS12 physical system.

    Of course it was a VM, and you had a snapshot before it broke, or your are on Win 8 / 10 and you have a restore point to go back to, where it was working.

    Well, not yet and I have been searching over the last couple of days. I really do not want to rebuild this server again because of this Add-On not being readily available, but it looks like I am in a catch 22 again.

    Yea, yea, I know, I can just type show-command -name whatever, but that is way more tedious and inconvenient.

Leave a Reply

Your email address will not be published. Required fields are marked *