Kako dobiti pomoć i pronaći pseudonime komandi u Windows Powershell-u?

Komanda u Powershell-u može imati jedan ili više alijasa. An alias is the command but in a shorter and mostly abbreviated form. Some aliases are made to match bash commands.

 

Get-ChildItem

Ova naredba ispisuje sadržaj trenutnog radnog direktorija.
pseudonim: ls, dir

 

Get-Alias

Da biste pronašli pseudonim komande u Powershell koristiti Get-Alias naredba.

 

Na primjer, pronaći sve aliase početi sa r
get-alias r*

 

The Get-Alias sama naredba ima pseudonim gal. The following will do the same thing as above…
gal r*

 

Get-Alias također dobiva punu komandu pseudonim
gal ls
izlazi: ls -> Get-ChildItem

 

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

gal -d get-childitem

izlazi

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 cmdlets starting with get
gcm -c cmdlet get*

 

The above is the same as….
Get-Command -CommandType Cmdlet Get*

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

help cp