Skip to content

Instantly share code, notes, and snippets.

@bielawb
Created April 6, 2020 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bielawb/b0d517beda544b665592cb0d8586348c to your computer and use it in GitHub Desktop.
Save bielawb/b0d517beda544b665592cb0d8586348c to your computer and use it in GitHub Desktop.
Niekoczekiwany wynik
$obiekt = [PSCustomObject]@{
Foo = [PSCustomOBject]@{
Bar = $false
}
}
# wymuszamy porównanie ciągów znaków - dostajemy $true
$obiekt.Foo.Bar -like 'False'
# pozostawiamy sprawę konwersji "prawy do lewego" - dostajemy $false
$obiekt.Foo.Bar -eq 'False'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment