Add-UDElement index?

Is there a way to stipulate where you want to add your new content within the parent ID?

Essentially, I want to add elements in reverse order so they appear at the top and push everything else down.


Something like this from Adam: Output Window with Scrollbar?
or you can add your items to an ordered hashtable: $hashtable = [ordered]@{}
or a pscustomobject “should” maintain order: $psco = [pscustomobject]@{}
( if it doesn’t, force it: $psco = [ordered][pscustomobject]@{} )


1 Like

Excellent shout, I think that’s what I’m after.