This script works as expected: a case sensitive hashtable is exported to clixml and then imported as case sensitive: # a case sensitive hashtable with keys 'a' and 'A' $hash = New-Object System.Collections.Hashtable $hash.Add('a', 1) $hash.Add('A', 2) $hash | Export-Clixml test.clixml # the dehydrated is still case sensitive, it contains keys 'a' and 'A' $hash2 = Import-Clixml test.clixml $hash2Output: Name Value ---- ----- a 1 A 2This script does not work as expected: a case sensitive hashtable is exported to clixml and then imported as NOT case sensitive: # a case sensitive hashtable with a key 'a' $hash = New-Object System.Collections.Hashtable $hash.Add('a', 1) $hash | Export-Clixml test.clixml # the dehydrated is not case sensitive, it fails on adding 'A' $hash2 = Import-Clixml test.clixml $hash2.Add('A', 2)Error: Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'a' Key being added: 'A'" At ...\try2.ps1:9 char:2 + $hash2.Add('A', 2) + ~~~~~~~~~~~~~~~~~~
Have you seen this problem before in this product?