Hogyan kaphat segítséget és megtalálni alias parancsokat a Windows PowerShell?

A parancs PowerShell egy vagy több alias. Az alias parancs, hanem egy rövidebb és többnyire rövidítve. Néhány álnevek készült, hogy megfeleljen a bash parancsok.

 

Get-ChildItem

Ez a parancs felsorolja a tartalom, az aktuális könyvtár.
Álnév: ls, dir

 

Get-Alias

Ahhoz, hogy megtalálja az alias Egy parancs PowerShell használja a Get-Alias parancs.

 

Például, megtalálja az álnevek kezdődik r
get-alias r*

 

A Get-Alias parancs maga is egy alias gal. The following will do the same thing as above…
gal r*

 

Get-Alias is megkapja a teljes parancs alias
gal ls
Outputs: ls -> Get-ChildItem

 

We can also find all the aliases of the specified command with the -Definition parameter. Például, let’s find all the aliases of the Get-ChildItem parancs. 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…
Get parancsmagjai kezdve get
gcm -c cmdlet get*

 

A fenti ugyanaz, mint….
Get-Command -CommandType Cmdlet Get*

To get help on any of the aliases or commands, just type help in front of the command. Például…

help cp