Fake ternary operator. You can assign straight from an if statement:
$z=if($x-eq$y){"truth"}else{"false"}
But you can use a 2-element array and use the test to index into it. $falsey results get element 0, $truthy results take element 1:
$z=("false","true")[$x-eq$y]
NB. that this is really doing array indexing, and if the test results in a value which can be cast to an integer, you'll ask for an item outside the bounds of the array and get $null back, and will need to do !(test) to force cast the result to a bool, with the options reversed.
[ Edit: There's a genuine ternary operator in PowerShell 7+ in the C-language-style cond ? 1 : 0 ]