CmdID

CmdID / PowerShell / Cmdlets / Show

Show-Command

Displays PowerShell command information in a graphical window. PowerShell reference

From the PowerShell reference 6 parameters Alias shcm

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Displays PowerShell command information in a graphical window. The Show-Command cmdlet lets you create a PowerShell command in a command window. You can use the features of the command window to run the command or have it return the command to you. Show-Command is a very useful teaching and learning tool. Show-Command works on all command types, including cmdlets, functions, workflows and CIM commands. Without parameters, Show-Command displays a command window that lists all available commands in all installed modules. To find the commands in a module, select the module from the Modules drop-down list. To select a command, click the command name. To use the command window, select a command, either by using the Name or by clicking the command name in the Commands list. Each parameter set is displayed on a separate tab. Asterisks indicate the mandatory parameters. To enter values for a parameter, type the value in the text box or select the value from the drop-down box. To add a [switch] parameter, click to select the parameter check box. When you're ready, you can click Copy to copy the command that you've created to the clipboard or click Run to run the command. You can also use the PassThru parameter to return the command to the host program, such as the PowerShell console. To cancel the command selection and return to the view that displays all commands, press Ctrl and click the selected command. In the PowerShell Integrated Scripting Environment (ISE), a variation of the Show-Command window is displayed by default. For information about using this command window, see the PowerShell ISE Help topics. This cmdlet was introduced in PowerShell 3.0. Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. This cmdlet is only available on Windows systems that support the Windows Desktop.

Show-Command [[-Name] <String>] [-Height <Double>] [-Width <Double>] [-NoCommonParameter] [-ErrorPopup] [-PassThru] [<CommonParameters>]

Open the Commands window

Show-CommandIdentify

Open a cmdlet in the Commands window

Show-Command -Name "Invoke-Command"Identify

Open a cmdlet with specified parameters

Show-Command -Name "Connect-PSSession" -Height 700 -Width 1000 -ErrorPopupIdentify

Specify new default parameter values for a cmdlet

$PSDefaultParameterValues = @{ "Show-Command:Height" = 700 "Show-Command:Width" = 1000 "Show-Command:ErrorPopup" = $true }Identify

Send output to a grid view

Show-Command Get-ChildItem | Out-GridViewIdentify

Display a command that you create in the Commands window

Show-Command -PassThruIdentify

Save a command to a variable

$C = Show-Command -PassThru $C Invoke-Expression $CIdentify

Save the output of a command to a variable

$P = Show-Command Get-Process -ErrorPopup $PIdentify

Its page in the reference: Show-Command.

Parameters

6 in the PowerShell reference
-ErrorPopupIndicates that the cmdlet displays errors in a pop-up window, in addition to displaying them at the command line. By default, when a command that is run in a Show-Command window generates an error, the error is displayed only at the command line. Also, when you run the command (by using the Run button in the Show-Command window), the ErrorPopup parameter returns the command results to the current command, instead of running the command and returning its output to a new command. You can use this feature to save the command results in a variable.
-HeightSpecifies the height of the Show-Command window in pixels. Enter a value between 300 and the number of pixels in the screen resolution. If the value is too large to display the command window on the screen, Show-Command generates an error. The default height is 600 pixels. For a Show-Command command that includes the Name parameter, the default height is 300 pixels.
-NameDisplays a command window for the specified command. Enter the name of one command, such as the name of a cmdlet, function, or CIM command. If you omit this parameter, Show-Command displays a command window that lists all of the PowerShell commands in all modules installed on the computer.
-NoCommonParameterIndicates that this cmdlet omits the Common Parameters section of the command display. By default, the Common Parameters appear in an expandable section at the bottom of the command window.
-PassThruReturns an object representing the item with which you are working. By default, this cmdlet does not generate any output. To run the command string, copy and paste it at the command prompt or save it in a variable and use the Invoke-Expression cmdlet to run the string in the variable.
-WidthSpecifies the width of the Show-Command window in pixels. Enter a value between 300 and the number of pixels in the screen resolution. If the value is too large to display the command window on the screen, Show-Command generates an error. The default width is 300 pixels.