Prev | Current Page 50 | Next

Joezer Cookey-Gam, Brendan Keane, Jeffrey Rosen, and Jonathan Runyon

"Professional Windows PowerShell for Exchange Server 2007 Service Pack 1"

The syntax of the test
condition is made up of the following elements:
{ $_. < property name > < comparison operator > < value to test > < conjunction > $_. < property
name > < comparison operator > < value to test > ...}
The first element $_ is a special variable (called an automatic variable) and is used to refer to objects
in the pipeline stream. Using a technique called dot notation a property name is appended to the
$_ variable to refer to the specific object property to which the test applies. For example, $_.Identity
refers to an object ??™ s Identity property.
A comparison operator is used to set the condition of the test. Windows PowerShell supports a number
of named comparison operators. The most frequently used operators for comparing whole property
values are eq (equals), ne (not equals), lt (less than), and gt (greater than). The like and notlike
operators are used to compare string values using wildcard rules. To see a complete list of all comparison
operators type Get-Help about_Comparison_Operators at the command line.
Chapter 1: Getting Started with Windows PowerShell
25
The value to test must be of the same data type of the property being tested. For example, if the property
data type is string, a string value enclosed in quotes must be used for the test.


Pages:
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
Firmy chińskie łódźkie przeciski pod drogami Golec uOrkiestra 3 ubezpieczenia jednoreki bandyta