Preferences don't sort

Topics: User Forum
Oct 2, 2009 at 3:23 AM

I noticed with the Preferences variable in the PSCX settings namespace that they aren't sortable using the Sort-Object cmdlet.  Have you seen this?

This is with PSCX 1.2 on Vista and on WIndows 7.

Oct 2, 2009 at 4:10 AM

That is the nature of a hashtable.  You could grab the keys, sort them and then access the objects by the sorted keys.

Oct 2, 2009 at 4:16 AM

I guess I expected differently from the PowerShell interface.  I guess I expected that I could pipe the results to Sort-Object and it would get sorted.  Too bad PS doesn't provide special handling for that class.  Oh well.  Thanks anyway.