Miten saada apua ja löytää aliaksia komentoja Windows PowerShell?

Komennon PowerShell voi olla yksi tai monta alias. Alias ​​on komento mutta lyhyempi ja useimmiten lyhennettä. Jotkut aliakset tehdään vastaamaan bash komennot.

 

Get-ChildItem

Tämä komento luetellaan sisältö nykyisen työhakemiston.
Alias: ls, dir

 

Get-Alias

Löytää alias komennon PowerShell käyttää Get-Alias komento.

 

Esimerkiksi, löytää kaikki alias alkavat R
get-alias r*

 

The Get-Alias komento on itse alias gal. The following will do the same thing as above…
gal r*

 

Get-Alias myös saa täyden komennon alias
gal ls
lähdöt: ls -> Get-ChildItem

 

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

gal -d get-childitem

lähdöt

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 -komentosovelmat alkaen get
gcm -c cmdlet get*

 

Edellä on sama kuin….
Get-Command -CommandType Cmdlet Get*

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

help cp