
上QQ阅读APP看书,第一时间看更新
Working with aliases
An alias, as the meaning goes, is an alternative name for cmdlet. They serve two purposes:
- To reduce the number of keystrokes
- To make the transition to PowerShell smoother
Traditionally, aliases were created in PowerShell so that Windows and Linux administrators did not find the new framework intimidating to work with. Regardless, aliases are best used only on the command line, and not in scripts, because some aliases are not aliases in Linux, and, in general, aliases affect readability. (For instance, it would take conscious effort to realize that gbp stands for Get-PSBreakPoint.)