A colleague that frequently uses notepad to edit scripts was asking for a way to more easily see the functions and parameters available for any installed PowerShell modules. This seemed like an excellent reason to switch away from notepad and the PowerShell console and instead embrace the PowerShell Integrated Scripting Environment (ISE). Although you can use the
Get-Command functions within the console, I think the Command Add-on, found within the PowerShell ISE, is a handy way to get started learning a module.
To begin, fire up the PowerShell ISE. It is installed natively on any current version of Windows. Notice the Commands panel on the right side of the ISE? That’s what we’re looking for.
Using the Commands Add-on is a breeze. For example, let’s say that I wanted to find a command in the Rubrik module.
- Locate the Rubrik module in the Modules drop down list. You can also type the first few letters to jump to any module name.
- If desired, enter a search string to match a specific function. By typing Connect into the box, the add-on is finding any function that contains the word Connect.
- Select the function that you wish to learn more about. In this case, I’ve selected the
- All function-specific parameters are listed in the Parameters for <Function Name> section. Any required parameters have an asterisk in the name, such as Server. Enter any parameter inputs you desire to test the function.
- There’s also a section for common parameters that are used by any function. For this example, I’ve chosen the
Verboseparameter, which is a switch that will expose any verbose logging that occurs while the function is run.
- Once the function-specific and common parameters are filled in, select Run to start the function, Insert to insert the constructed function (with parameters) into the script pane, or Copy to copy the constructed function (including parameters) into the clipboard.
- By clicking on the Insert button, the completed function is inserted into the script pane.
This is a handy way to build and test parameters for functions within your PowerShell modules. It has that GUI feeling to it to help folks new to PowerShell scripting along, especially if you aren’t taking advantage of IntelliSense (the smarts that auto-completes functions in PowerShell).
Another advantage of the Command Add-on is the ability to visualize oddball modules, such as Pester, that don’t follow the verb-noun format. In this case, I’ve output all of the functions in the screenshot below. Because Pester is a testing module, it has a very different look and feel to the commands.