Хелпикс

Главная

Контакты

Случайная статья





Language of PowerShell Lab Answers



Language of PowerShell Lab Answers

Command Syntax

 

In this lecture I’m gonna give you the answers to the questions, from the Command Syntax Section.

 We’ll take a look at the command syntax from get service

The Answer is in 6 parts, we’ll start from the left and work to the right

1. Every cmdlet is based upon the same structure A name for this structure is? Verb - Noun

2. A dash tells PowerShell that a Parameter is being used.

3. Two angle brackets tell’s me that this a Argument.

4. The word string is located between two angle brackets, string is called a Value Type.

5. When two square brackets are surrounded by two angle brackets this tells us that this can take multiple arguments separated by a comma.

6. These three groups are called _Parameter sets.

   

Question 2 video and tablet 

The question was:

· Take a look at the parameter sets from get-service. Can you tell me which parameters are unique in each set? Now tell me what parameters are common in each set.

The answer is in three parts.

· In order to have a parameter set each set must have at least one unique parameter. Our unique parameters in this case are:

· Displayname from set #1

· Inputobject from set # 2

· Name from # 3

Question 2 Part 2

· Question was:

· Now tell me what parameters are common to each set.

The Common Parameters in Set # 1, 2, 3 are:

· Computername, DependentServices, Exclude, Include, RequiredServices, Common Parameters

Question 2 Part 3

· The Question was:

You probably noticed that commonparameters are common to all three sets.

· What command would you use to checkout the help for commonparameters?

· Type get-help about_common_parameters.

Scroll to the top.

· Some of the highlights are debug, outvariable, verbose, whatif and confirm

· If you want to know more notice there are descriptions for each parameter.

· Most of the time these parameters work with every cmdlet.

 



  

© helpiks.su При использовании или копировании материалов прямая ссылка на сайт обязательна.