How do I create an a statement with an inline If (IIf, see also: Immediate if or ternary If) in PowerShell?
If you also think that this should be a native Po
PowerShell doesn't have support for inline ifs. You'll have to create your own function (as another answer suggests), or combine if/else statements on a single line (as another answer also suggests).