Aliases are alternate names or nicknames for a cmdlet or for a command element, such as a function, script, file, or executable file.
When I teach PowerShell, I usually divide aliases into two groups:
Transitional aliases such as ls or dir (for Get-ChildItem), and type or cat (for Get-Content) that are aimed for people transitioning from other shells to PowerShell,
and Shortcut aliases such as gwmi (for Get-WmiObject) and gps (for Get-Process) that help you speeds things up when you code in the console.
To get the list of all the defined aliases in your runspace, use the Get-Alias cmdlet, or the alias PSDrive using dir alias:\
Though aliases are great, especially for the lazy typer that I am, they should not be used in scripts that you or someone else would need to read and maintain in the future.
Aliases can make your scripts inconsistent, where you use an alias that you have defined in your profile and/or someone else that runs your script has a different definition for the alias.
This is why I avoid using aliases in my scripts, and before I distribute them, I replace all the aliases in it to the full cmdlet name.
For this, I’ve written a little piece of code and set it as an Add-on in the ISE.
Add the code below to your ISE profile (usually C:\Users\<you>\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1):
functionExpand-Aliases {