fbpx

EXECUTING COMMANDS ON WINDOWS POWERSHELL ISE

23 Dec EXECUTING COMMANDS ON WINDOWS POWERSHELL ISE

To get the list of commands starting with “Get” on windows PowerShell ISE following command can be executed. Here “*” works as a wildcard character.

help get*

12-23-2013-10-55-59-AM
Command comes with auto complete feature, so by writing command’s first word it will auto populate related commands list and required command can be selected from dropdown of can be completed by TAB

12-23-2013-10-58-12-AM-300x122

Get-Alias gives the list of command with their alias name, for example cd command is being used as changed directory in DOS prompt which can be used in PowerShell as well, but its actual command for PowerShell is Set-Location.

12-23-2013-11-02-35-AM-300x243
12-23-2013-11-05-40-AM-300x81

Commands may contain some list of parameters and executing commands with those parameters will customized results as per the requirement. These parameters are also known as Filters. For example command Get-History gives the list of commands executed.

12-23-2013-11-10-23-AM-300x102

But if we execute the same command with –Id parameter it gives different result.

12-23-2013-11-11-53-AM-300x109

Some cmdlets requires a parameter by default. If parameter is missed by mistake it will ask for the required parameter. For example Get-LogProperties requires a log name but if it was not passed for following execution.

12-23-2013-11-17-27-AM-300x167

If cmdlets are passed with required parameters it will give results directly.

12-23-2013-11-18-41-AM-300x112