From what I know, PowerShell doesn\'t seem to have a built-in expression for the so-called ternary operator.
For example, in the C language, which supports the terna
Try powershell's switch statement as an alternative, especially for variable assignment - multiple lines, but readable.
Example,
$WinVer = switch ( Test-Path $Env:windir\SysWOW64 ) { $true { "64-bit" } $false { "32-bit" } } "This version of Windows is $WinVer"