Exclusive or

The -xor operator will return true if either the value on the left is true, or the value on the right is true, but not both.

For example, each of the following returns true:

$true -xor $false 
1 -le 2 -xor 1 -eq 2 
(Test-Path C:Windows) -xor (Test-Path D:Windows) 

The -xor operator is perhaps one of the most rarely used in PowerShell.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.76.0