Operators and Special Values


in many cases PowerShell uses different operators than VBScript, and it uses some operators differently. The following table provides a summary of these operators:

In VBScript

Purpose

In PowerShell

=

Assignment

=

=

Equality test

-eq

>

Greater than

-gt

<

Less than

-lt

>=

Greater than or equal to

-ge

<=

Less than or equal to

-le

True

Boolean True

$true

False

Boolean False

$false

AND

Boolean AND

-and

NOT

Boolean NOT

-not

OR

Boolean OR

-or

AND

Binary AND

-band

OR

Binary OR

-bor

NOT

Binary NOT

-bnot

&, +

String concatenation

+

Refer to Chapter 6 to review the discussion of the additional operators offered in PowerShell.



Windows PowerShell. TFM
Internet Forensics
ISBN: 982131445
EAN: 2147483647
Year: 2004
Pages: 289

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net