See also

  1. Recipe 5.8: Understanding pipeline-enabled parameters

That concludes the chapter. It is time to take a break, so it helps you assimilate what you learnt. Later, experiment with different data types, create variables, see what type of objects they contain, and what members each object contains. We did not explicitly talk much about variables in this chapter other than environment variables, but we used variables almost in every recipe in the chapter. Ponder over (or better yet, practically try out) these questions:

  1. What can be assigned to a variable?
  2. What does the variable contain; the entire object?
  3. Can I refer to one single property of the object that a variable contains, if at all it contains the entire object?
  4. Can I assign a certain member and not the entire object to a variable?
  5. What if the member is a whole object in itself? (Hint: Use Get-Member on the variable to find out.)
  6. What happens when I use Select-Object with -ExpandProperty and assign the value to a variable? What type is the variable then?

That would help you understand more about the variables, now that you have used them so much.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.78.106