- PowerShell Tutorial
- PowerShell - Home
- PowerShell - Overview
- PowerShell - Environment Setup
- PowerShell - Cmdlets
- PowerShell - Files and Folders
- PowerShell - Dates and Timers
- PowerShell - Files I/O
- PowerShell - Advanced Cmdlets
- PowerShell - Scripting
- PowerShell - Special Variables
- PowerShell - Operators
- PowerShell - Looping
- PowerShell - Conditions
- PowerShell - Array
- PowerShell - Hashtables
- PowerShell - Regex
- PowerShell - Backtick
- PowerShell - Brackets
- PowerShell - Alias
- PowerShell Useful Resources
- PowerShell - Quick Guide
- PowerShell - Useful Resources
- PowerShell - Discussion
Powershell - Alias
PowerShell alias is another name for the cmdlet or for any command element.
Creating Alias
Use New-Alias cmdlet to create a alias. In the below example, we've created an alias help for Get-Help cmdlet.
New-Alias -Name help -Value Get-Help
Now invoke the alias.
help Get-WmiObject -Detailed
You will see the following output.
NAME Get-WmiObject SYNOPSIS Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes. SYNTAX Get-WmiObject [ ...
Getting Alias
Use get-alias cmdlet to get all the alias present in current session of powershell.
Get-Alias
You will see the following output.
CommandType Name Definition ----------- ---- ---------- Alias % ForEach-Object Alias ? Where-Object Alias ac Add-Content Alias asnp Add-PSSnapIn ...
Advertisements
To Continue Learning Please Login
Login with Google