 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get/resolve the command from the alias in PowerShell?
To resolve the command name from given alias, you need to use the below command.
$Alias:AliasName
For example,
$Alias:dir
OR
$Alias:ls
Output
Get-ChildItem
This means the above commands will provide the same result. For example, the output of the below commands would remain the same.
Get-ChildItem C:\ Dir C:\ ls C
Output

You can also use Get-Alias to resolve the alias name. For example,
Get-Alias -Name dir

Get-Alias -Name ls

Until now we need to remember alias name to get the command and we were running individual commands to get the Alias and its command. It is possible to get all the alias names for the given command. To get all aliases for Get-ChildItem.
Get-Alias | where {$_.Definition -eq "Get-ChildItem"} Output

Get-Alias | where {$_.Definition -eq "Get-Content"}  Output

Advertisements
 