In powerShell you compare a boolean with a string with the "-eq" operator it will always return the same boolean as I used to compare.
E.g.
$shouldBeFalse = $true -eq "hello"
$shouldBeTrue = $false -eq "hello"
The variable $shouldBeFalse is $true. The variable $shouldBeTrue is $false.
I had to use the "Equals" method:
$shouldBeFalse = $true.Equals("hello")
In this case $shouldBeFalse is $false.
But why returns the -eq operator with boolean these kind of results?