Place Special Characters in a String
1. Problem
You want to place special characters (such as tab and newline) in a string variable.
2. Solution
In an expanding string, use PowerShell’s escape sequences to include special characters such as tab and newline.
       PS >$myString = “Report for Today’n—————-”
       PS >$myString
       Report for Today
       —————-
3. Discussion
As discussed in Section 5.1, “Create a String,” PowerShell strings [...]
Create a Multiline or Formatted String
1. Problem
You want to create a variable that holds text with newlines or other explicit formatting.
2. Solution
Use a PowerShell here string to store and work with text that includes newlines and other formatting information.
       $myString = @”
       This is the first line
       of a very long string. A “here string”
       lets you to create blocks [...]
Types and Objects
1. Problem
You have an instance of an object and want to know what methods and properties it supports.
2. Solution
The most common way to explore the methods and properties supported by an object is through the Get-Member cmdlet.
To get the instance members of an object you’ve stored in the $object variable, pipe it to the Get-Member [...]
Control Access and Scope of Variables and Other Items
1. Problem
You want to control how you define (or interact with) the visibility of variables, aliases, functions, and drives.
2. Solution
PowerShell offers several ways to access variables.
To create a variable with a specific scope, supply that scope before the variable name:
       $SCOPE:variable = value
To access a variable at a specific scope, supply that scope before [...]
Access Environment Variables
1. Problem
You want to use an environment variable (such as the system path, or current user’s name) in your script or interactive session.
2. Solution
PowerShell offers several ways to access environment variables.
To list all environment variables, list the children of the env drive:
       Get-ChildItem env:
To get an environment variable using a more concise syntax, precede [...]
Store Information in Variables
1. Problem
You want to store the output of a pipeline or command for later use, or to work with it in more detail.
2. Solution
To store output for later use, store the output of the command in a variable. You can access this information later, or even pass it down the pipeline as though it was [...]

