Skip to content

Instantly share code, notes, and snippets.

@codykonior
Created December 5, 2019 04:03
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 codykonior/48cf26b9d92c3d7f5f4bbe4df099c395 to your computer and use it in GitHub Desktop.
Save codykonior/48cf26b9d92c3d7f5f4bbe4df099c395 to your computer and use it in GitHub Desktop.
$test = @(
[PSCustomObject] @{ IsReady = $false }
[PSCustomObject] @{ IsReady = $true }
)
if ($test.IsReady) {
"Output 1"
}
if ($true -eq $test.IsReady) {
"Output 2"
}
if ($false -ne $test.IsReady) {
"Output 3"
}
if (-not ($false -eq $test.IsReady)) {
"Output 4"
}
if (-not ($test.IsReady | Where-Object { $false -eq $_ })) {
"Output 5"
}
if (-not ($test | Where-Object { $false -eq $_.IsReady })) {
"Output 6"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment