Remove a key value pair from an existing hash table
suggest changeAn 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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents