Computer Library windows 2008 exchange server power shell security register

Measure Statistical Properties of a List

1. Problem
You want to measure the numeric (minimum, maximum, sum, average) or textual (characters, words, lines) features of a list of objects.
2. Solution
Use the Measure-Object cmdlet to measure these statistical properties of a list.
To measure the numeric features of a stream of objects, pipe those objects to the Measure-Object cmdlet:
        PS >1..10 | Measure-Object–Average -Sum
        [...]


Add Custom Methods and Properties to Objects

1. Problem
You have an object and want to add your own custom properties or methods (members) to that object.
2. Solution
Use the Add-Member cmdlet to add custom members to an object.
3. Discussion
The Add-Member cmdlet is extremely useful in helping you add custom members to individual objects. For example, imagine that you want to create a report [...]


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:
        [...]