Hashtable Add method removes custom PSMembers added via Add-Member - by Bardo33

Status : 


Sign in
to vote
ID 777930 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 1/30/2013 8:13:36 PM
Access Restriction Public


When adding objects to a hashtable, the "Add" method removes any members which have been added via the Add-Member cmdlet.
However, when adding objects to the hashtable using the $hashtable = @{ "myKey" = $myValue } syntax, the custom PS members are retained.

This occurs in PS V2 & V3; and also possibly in V1 (not verified).
Sign in to post a comment.