Is there a null coalescing operator in powershell?
I\'d like to be able to do these c# commands in powershell:
var s = myval ?? \"new value\"; var x
If you install the Powershell Community Extensions Module then you can use:
?? is the alias for Invoke-NullCoalescing.
$s = ?? {$myval} {"New Value"}
?: is the alias for Invoke-Ternary.
$x = ?: {$myval -eq $null} {""} {$otherval}