- AWS Tools for PowerShell 6
- Ramesh Waghmare
- 251字
- 2021-07-15 17:09:13
Learning cmdlets
There are thousands of cmdlets available. Don't worry. It's not very scary. Don't think that you need to remember all those cmdlets to be a good IT admin or a developer. I do not know anybody who claims that he knows all the cmdlets. As I said earlier, the number of cmdlets are increasing day by day; what is important to know is how to get help on those cmdlets, discover the cmdlets, and learn the properties associated with specific cmdlets. Let's dive a little deeper into one cmdlet called Get-Service. Now, if you run this cmdlet in the PowerShell command prompt, you find that it returned just three columns.

Does that mean that it has just got three columns? The answer is NO. There are methods and properties associated with each cmdlet. You can learn more about those methods and properties using the Get-Member cmdlet with Get-Service.

This way you can learn about the cmdlet that you plan to use in your scripting. You can now see that there are several properties and methods that you can make use of instead of the default output. Usually, if you are a developer, you will love to know more about the methods so that you can interact with the service using code.
Let's assume that you are interested in Name, Status, and StartType. You can tweak the output now using Format-List or Format-Table cmdlet as follows:
PS C:\>Get-Service | Format-List Name, Status, StartType
PS C:\>Get-Service | Format-Table Name, Status, StartType
- Advanced Quantitative Finance with C++
- Mobile Web Performance Optimization
- Building a Game with Unity and Blender
- R語言游戲數(shù)據(jù)分析與挖掘
- DevOps Automation Cookbook
- SQL Server 2016數(shù)據(jù)庫應(yīng)用與開發(fā)習(xí)題解答與上機(jī)指導(dǎo)
- Spring Boot進(jìn)階:原理、實(shí)戰(zhàn)與面試題分析
- Python Data Analysis Cookbook
- C語言程序設(shè)計(jì)實(shí)訓(xùn)教程與水平考試指導(dǎo)
- Hadoop大數(shù)據(jù)分析技術(shù)
- Clojure High Performance Programming(Second Edition)
- Python編程基礎(chǔ)教程
- Arduino Electronics Blueprints
- Spring Boot學(xué)習(xí)指南:構(gòu)建云原生Java和Kotlin應(yīng)用程序
- 計(jì)算機(jī)輔助設(shè)計(jì)與繪圖技術(shù)(AutoCAD 2014教程)(第三版)