Home Blog New Real-Time Command Analysis

New Real-Time Command Analysis

Command Analysis is a new feature present in ISESteroids Enterprise and PowerShell Specialist. It is not present in ISESteroids Professional.

Enabling Real-Time Analysis

To enable command analysis, note the new “Command Analysis” handle at the bottom of the console pane. Drag it up to open the command analysis tab.

Performing Real-Time Analysis

Whenever you enter a command, this tab will show you a wealth of useful information related to the command executed:

  • Cmdlet: Here you find the resolved command and parameter binding information. You immediately see what the real command was that PowerShell executed, and how your arguments (if any) were bound to the command parameters. Hover over a parameter to view detailed binding information. Click on the command name to open help for this command.
  • Data: If the command emitted data, here you find a fully browsable sample section. It will show one item per data type returned by the command. So if a command returns just one type of object, you find one item. If it returns different types, you find one set of data per type.
  • Member: If the command emitted data, this pane shows you the Get-Member information for any object type emitted. You can immediately explore the results emitted by a command.
  • Binding: provides detailed parameter binding information in a treeview. This tab helps you explore and understand how PowerShell binds arguments to parameters.

This works for any command that invokes parameter binding, so it applies to cmdlets and advanced PowerShell functions. Simple powershell functions (without a param() block and without the [CmdletBinding()] attribute do not invoke the binder.

Parameter binding is not invoked for scripts or commands that you execute remotely on another machine, because here the binding is performed by the remote host.

Debugging Scripts

When you set breakpoints in a script and debug the script, the real-time analysis also works when you step. Whenever you step, the command being stepped is analyzed.

During debugging, the “Member” tab will not show results, though.

Disabling Real-Time Analysis

Real-time analysis has almost no impact on execution speed. When you drag down the “Command Analysis” handle, though, you can disable real-time analysis any time. Right-click the handle to hide it altogether.

To re-enable a hidden handle, click the console, then click the console options button in the status bar (it looks like a dark console window).