Level 1
0 / 100 XP

Command Syntax Lab Questions

This lab is being rebuilt

We are replacing our previous lab platform with new browser-based IT labs. This lesson's hands-on environment is temporarily unavailable while we finish the migration.

Check back soon, or continue with the next lesson in your course if your instructor has pointed you there.

In this lecture I’m going to ask you some questions from the Command Syntax Section.

**We’re going to take a look at the command syntax from get-service **

Fill in the blank

**Question #1 **Question 1 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? ______ _______

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

  3. Two angle brackets tells me that this a ___________

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

  5. When you see two square brackets surrounded by two angle brackets this tells you that this is a ________ __________ __________ __ ______

  6. These three groups are called __________ __________

Question #2 This question is in three parts

  • Now tell me what parameters are common in each set.
  • **3.**You probably noticed that commonparameters arecommon to all three sets.

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

**Question #3 **

From the ISE, type get-service , then press return. You see the command ran.

Type get-help get-service -full. Press return.

Now explain using the syntax why get-service **ran **without using any parameters.

Question #4

From the ISE, type get-eventlog then press return. Notice that get-eventlog is asking for the name of one of the logfiles.

Press ctrl-c

Now type get-help get-eventlog -full.

Using the syntax, explain why get-eventlog requires typing a value or a logname, while get-service ran without a value or even a parameter.

**Question #5 (CS #2) **Goal:

Using help get-eventlog -showwindow. Take a look at the parameter -instanceID .

  1. Explain why -instanceID should be second in the order of parameters?

**Question #6 (CS #2) **Goal:

Let’s scroll down to -Newest.

  • Why can you place –newest anywhere in the order of parameters?