Skill 2
Skill 2
2023-20-11
Scenario:
Let's say you frequently need to retrieve information about running
processes using the Get-Process cmdlet. Typing out the full cmdlet
each time can be cumbersome. In this case, you can create an alias to
simplify the command.
without using alias
Get-process
Using alias
gal -name exploder
By using the alias, you can significantly reduce the amount of typing
required to perform the same task. This is particularly beneficial
when you are working interactively in the PowerShell console and
want to streamline your commands.
18. Write a PowerShell command to display all
aliases starting with the letter "G."
Ans: The command to display all aliases starting with
the letter "G” is get-alias -name G*.