官术网_书友最值得收藏!

  • AWS Tools for PowerShell 6
  • Ramesh Waghmare
  • 292字
  • 2021-07-15 17:09:13

Reading the PowerShell language

PowerShell is a natural language that you can learn quickly. There are four types of commands that PowerShell can run. Those are windows native, aliases, scripts, and cmdlet. Many people think that the only thing that PowerShell can do is run cmdlet, but that's not all true. Certainly, cmdlets are more popular, but in addition, you can run Windows native commands, aliases, and scripts. Cmdlets have a unique structure. There are thousands of cmdlet provided by AWS for managing the AWS infrastructure. Almost all the cmdlets work in a similar way, and this simplifies the scripting. All cmdlets have two parts. The first part is a verb and the second part is a noun. Usually, the verb indicates an action for the command, and the noun indicates a specific service or program. Set, get, add, and remove are some of the most popular verbs that you will see in PowerShell.

General syntax for cmdlet is:

Cmdlet structure: <verb> - <noun>

Dash (-) in between the verb and noun completes the Windows PowerShell command. It is also a PowerShell convention to use singular nouns. While it is not universally applied, if you are not sure whether a noun is singular or plural, go with singular. Let's say, if you want to see list of services running on Windows, then Get-Service is the cmdlet that you can use and not Get-Services:

PS C:\>Get-Service

Note that PowerShell cmdlets are not case sensitive, so if you type Get-Service or get-service in the PowerShell command prompt, both of them are going to yield the same result. You can get the list of common verbs used by PowerShell by running the following:

PS C:\>Get-Verb

This will give you an idea of how many verbs that PowerShell uses.

主站蜘蛛池模板: 城步| 林周县| 宁阳县| 报价| 博野县| 景东| 黑水县| 文登市| 嘉峪关市| 丰顺县| 介休市| 鹿邑县| 城步| 西贡区| 成武县| 大石桥市| 竹北市| 宜兴市| 渭南市| 黑河市| 独山县| 辽中县| 林州市| 玉溪市| 彰化市| 买车| 荃湾区| 通州区| 龙川县| 分宜县| 兴国县| 长乐市| 定陶县| 明水县| 达日县| 西安市| 拉萨市| 旬阳县| 通山县| 长汀县| 抚松县|