I'm learning PowerShell in school, I have a basic question regarding percentage calculations:
$foo = "10%"
$bar = "5%"
$foo -gt $bar
False
I tried converting to integer type:
[int]$foo -gt [int]$bar
Cannot convert value "10%" to type "System.Int32".
Error: "Input string was not in a correct format."
Is there a percentage data type in PowerShell? Or a comparison operator for working with percentages?