
上QQ阅读APP看书,第一时间看更新
Discovering cmdlets
So far, we have seen how we can get Help on cmdlets. We used the Get-Command cmdlet as an example argument. Now, we are going to use Get-Command to discover cmdlets in PowerShell. Get-Help and Get-Command become the two most important cmdlets when you need any Help information in PowerShell.
PowerShell is like plain English—PowerShell follows the Verb-Noun format in cmdlet naming, which makes the cmdlets sound like plain English commands. It is a convention in PowerShell to use approved verbs, which ensures that verbs are limited in order to facilitate discovery. The nouns, on the other hand, can be arbitrary.
Thinking in the scripting/programming language of your choice, along with muscle memory, is key to speed and efficiency. PowerShell's English-like structure helps in this regard; it is easy to think in PowerShell. For instance, if you would like to know the current date, all you have to say is Get-Date, and PowerShell will print the date and time on the screen for you.