Home Dashboard Directory Help
Search

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


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 777930
Opened: 1/30/2013 8:13:36 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

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).
Details
Sign in to post a comment.
Sign in to post a workaround.