Remove a key value pair from an existing hash table

suggest change

An example, to remove a “Key2” key with a value of “Value2” from the hash table, using the remove operator:

$hashTable = @{
    Key1 = 'Value1'
    Key2 = 'Value2'
}
$hashTable.Remove("Key2", "Value2")
$hashTable

#Output

Name                           Value
----                           -----
Key1                           Value1

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents