SyntaxFix
Write A Post
Hire A Developer
Questions
As of PowerShell version 7, the ternary operator is built into PowerShell.
1 -gt 2 ? "Yes" : "No" # Returns "No" 1 -gt 2 ? 'Yes' : $null # Get a $null response for false-y return value