General

Aliases in PowerShell

From TechGenix:

When it comes to PowerShell, I have always had something of a love/hate relationship with aliases. On one hand, many of the PowerShell aliases that exist are completely cryptic and I think that they make it a lot more difficult to figure out what a line of code does. That’s why I rarely use aliases in the PowerShell code that I include in my articles.

The flip side to that is that PowerShell aliases can make the transition from the Windows Command Prompt to PowerShell a little bit easier. Many of the old DOS commands have been implemented in PowerShell in the form of aliases. For example, the PowerShell cmdlet for retrieving a list of the files in the current folder is Get-ChildItem. The DOS command for doing the same thing is DIR. Even so, the DIR command works in PowerShell, because it is actually an alias for the Get-ChildItem command…

(Read more)