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 [...]
Work with Each Item in a List or Command Output
1. Problem
You have a list of items and want to work with each item in that list.
2. Solution
Use the Foreach-Object cmdlet (which has the standard aliases foreach and %)to work with each item in a list.
To apply a calculation to each item in a list, use the $_ variable as part of a calculation in [...]
Display the Properties of an Item As a List
1. Problem
You have an item (for example, an error record, directory item, or .NET object), and you want to display detailed information about that object in a list format.
2. Solution
To display detailed information about an item, pass that item to the Format-List cmdlet. For example, to display an error in list format, type the commands:
       [...]

