Doing shorter comparisons in PowerShell
I found a semi-edge case where a multiple comparison can be shortened. This is useful when you need to test two or more variables for equality, and only return true if all tests are true.

Instead of this:

$a-eq$b-and$c-eq$d


You might be able to do this:

"$a$c"-eq"$b$d"


It's worked for me in a Pisano Period script, where I changed:

$a-eq1-and$b-eq0


To:

"$a$b"-eq10


Another example:

$a-eq'apple'-and$b-eq'orange'


Can be cut down to:

"$a$b"-eq'appleorange'