Command to know the version of Powershell Type In the below example you will notice that the powershell version 3.0...
In PowerShell, an alias is another name assigned to a cmdlet, function, script, executable file, and so on. Just about anything you can run from the PowerShell command prompt can have an alias assigned to it.Windows users can utilize commands like dir, move, type, cls, etc… PowerShell also provides a set of aliases for Linux; ls, pwd, mv, man, cat, etc… PowerShell Aliases are provided for the purpose of allowing new users the ability to quickly interact with the shell. An alias is an alternative name assigned to a cmdlet. For example, “dir” is an alias for “Get-ChildItem.” This tutorial presents two types of aliases:
Built-in Aliases – Predefined alternative names for Windows, Unix, and PowerShell cmdlets.
User-defined Aliases – Custom alternative names created by the user.
Built-In PowerShell Aliases
Built-in aliases are predefined. Use the following cmdlet to get a list of PowerShell Aliases:
While going through the list, you will find that there are multiple Aliases for the “Get-ChildItem” cmdlet. Windows “dir” command, Unix “ls” command, and a PowerShell alias “gci” command. No matter which alias you have chosen to use, typing any one of the aliases will result in the running of the “Get-ChildItem” cmdlet.
type the following:
dir <enter> ls <enter> gci <enter> Get-ChildItem <enter>
You can verify that each command resulted in the same output. In reality, we just ran “Get-ChildItem” four times. There is really not much more to built-in aliases.
In the next session User-Defined aliases will be disucussed in detail.