Com obtenir ajuda i trobar els àlies d'ordres a 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
Aquesta comanda mostra el contingut del directori de treball actual.
àlies: ls, dir
Get-Alias
Per trobar l'àlies d'un comando d'PowerShell utilitzar el Get-Alias comandament.
Per exemple, find all the aliases start with r
get-alias r*
La Get-Alias comandament en si té un àlies gal. The following will do the same thing as above…
gal r*
Get-Alias També obté el domini total d'un àlies
gal ls
Outputs: ls -> Get-ChildItem
We can also find all the aliases of the specified command with the -Definition parameter. Per exemple, let’s find all the aliases of the Get-ChildItem comandament. 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…
Obtenir cmdlets començant amb get
gcm -c cmdlet get*
L'anterior és el mateix que….
Get-Command -CommandType Cmdlet Get*
To get help on any of the aliases or commands, just type help in front of the command. Per exemple…
help cp
