Summary: Learn how to easily empty a hash table by using Windows PowerShell.
I want to write new values to a hash table, and I want to ensure that it contains none of the original keys or values.
How can I accomplish this task without deleting and re-creating the hash table?
Use the Clear method from the hash table object, for example:
PS C:\> $a = @{a=1;b=2;c=3}
PS C:\> $a.Clear()