Як отримати допомогу і знайти псевдоніми команд в 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
This command lists the content of the current working directory.
кличка: ls, dir
Get-Alias
To find the alias of a command in Powershell use the Get-Alias команда.
Наприклад, find all the aliases start with r
get-alias r*
The Get-Alias command itself has an alias gal. The following will do the same thing as above…
gal r*
Get-Alias also gets the full command of an alias
gal ls
Outputs: ls -> Get-ChildItem
We can also find all the aliases of the specified command with the -Definition parameter. Наприклад, let’s find all the aliases of the Get-ChildItem команда. 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 має псевдонім gcm. So we can do this…
Отримати командлети починаючи з прибудете
gcm -c cmdlet get*
Вище, є такий же, як….
Get-Command -CommandType Cmdlet Get*
Для отримання довідки за допомогою одного з псевдонімів або команд, just type help in front of the command. Наприклад…
допомога сп
