I use PowerShell to execute SQL query to get computer process id and return hash tale below:
$processId
5068
6176
7240
7632
Now, I use: $processId -contains 5068
to check this value exist in $processId
or not.
My expected is true
but it return false
.
I don't know why. Welcome all answer.
Result $processId | Get-Member:
On a hashtable, you can check for existing items using the ContainsKey()
method. For example:
$processId.ContainsKey(5068)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With