Essay 3 --- PowerShell aliases

Previous mentions an alias, it is necessary to talk about this, because we often encounter the following two conditions:

  • Write their own script, I want to quickly some of the nomenclature
  • Look at the script, and you want to find someone else, like using an alias, but the alias you forget what it means.

We can see through the Get-Alias ​​command, our Get-Command command as an example:

 We can look at all the aliases and help write the command:

 

 There are a lot of aliases, feeling not remember?

In fact, you look at the correspondence between commands and aliases.

Command said earlier, is "a verb - noun" format, and often when the verb Get, Set, Copy, Remove, Import, Export, Invoke, Clear and other terms it, there are a lot of Command, Item, Content and so on.

These aliases are some rules to follow, such as Get that g, Copy is cp, Remove is r, item is i, Content is c, and so on.

The remaining portion of the irregular use of skilled, but also the natural remember.

If you need to read the script in the team to modify, then I suggest you use the original command, good readability.

 

Guess you like

Origin www.cnblogs.com/talentzemin/p/12372208.html