- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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
- Related Articles
- How to run PowerShell commands from the command prompt?
- How to use function Alias in PowerShell?
- How to use an alias() for the parameter in PowerShell?
- How to create PowerShell alias permanently?
- How to run a PowerShell script from the command prompt?
- How to create new alias with PowerShell?
- How to overwrite or remove PowerShell alias?
- How to exclude the RunSpaceID property from the Invoke-Command output in PowerShell?
- How to get all the processes on the local computer with Get-Process command using PowerShell?
- How to use the Timeout command in PowerShell?
- How to use the tree command in PowerShell?
- How to Resolve DNS address using PowerShell?
- What is the use of Get-Process command in PowerShell?
- How to use the Set-Location command in PowerShell?
- How to exclude PSComputerName property from Invoke-Command output in PowerShell?

Advertisements