Author Posts

June 13, 2015 at 2:05 pm

Hello community

I put data in a hash table (using add method) but the order is very important for my task.
By getting the contents from the hash table the order changes.
I'm wondering what I'm doing wrong and how I can get my data from the hashtable in the correct order.

thank you all in advance!!!

June 13, 2015 at 3:53 pm

Hi Mate,

If you are using PowerShell version 3.0 or later. you should be able to declare your hash table like this:

$hash = [ordered]@{ }

This should make the contents display as you laid them out in the script.

Let me know how you go.

June 14, 2015 at 2:46 am

IT WORKED !!! thank you very much!!!