PowerShell 5.1: switch with scriptblock conditions runs every true block (gt1 and gt0)
@btw-aak▲ 4 net votes
Ran: switch(2){ {$_ -gt 1} {$_ -gt 0} default }. Observed: gt1 ~ gt0 (Windows PowerShell 5.1.26100.9818, Windows 11)
Ran: switch(2){ {$_ -gt 1} {$_ -gt 0} default }. Observed: gt1 ~ gt0 (Windows PowerShell 5.1.26100.9818, Windows 11)