Jinsi ya kupata msaada na kupata majina ya utani ya amri katika Windows Powershell?

A command in Powershell can have one or many alias. An alias is the command but in a shorter and mostly abbreviated form. Some aliases are made to match bash commands.

 

Get-ChildItem

Amri hii orodha maudhui katika orodha ya sasa ya kufanya kazi.
Lakabu: ls, dir

 

Get-Alias

Kupata pak ya amri katika Powershell kutumia Get-Alias amri.

 

Kwa mfano, kupata majina ya utani wote kuanza na r
get-alias r*

 

The Get-Alias amri yenyewe ina pak gal. The following will do the same thing as above…
gal r*

 

Get-Alias pia anapata amri kamili ya pak
gal ls
Outputs: ls -> Get-ChildItem

 

We can also find all the aliases of the specified command with the -Definition parameter. Kwa mfano, let’s find all the aliases of the Get-ChildItem amri. We use -d which is short for -Definition

gal -d get-childitem

Outputs

dir -> Get-ChildItem
gci -> Get-ChildItem
ls -> Get-ChildItem

 

Get-Command finds the commands by command name. Get-Command has the alias gcm. So we can do this…
Kupata cmdlets kuanzia na kupata
gcm -c cmdlet get*

 

hapo juu ni sawa na….
Get-Command -CommandType Cmdlet Get*

To get help on any of the aliases or commands, just type help in front of the command. Kwa mfano…

help cp