It’ll help to let me know how you need to USE this construct you’re creating. What you’ve produced in strDict is not a dictionary; it’s an array. A two-dimensional array, wherein the first dimension has “X” elements and the second dimension has 3 elements. Like an X-by-3 spreadsheet. A dictionary’s super power is that it lets you specify a key and then get the associated value. PowerShell does dictionaries awesome. It does arrays, too, but they’re different, and you use them differently.
That’s why it’d help to know how you plan to use this thing you’re making. A one-for-one translation from VBScript isn’t necessarily leveraging PowerShell. You can end up working a lot harder to recreate some VBS effect, when in fact PowerShell could get you to the end result a lot more easily than VBS did.
PowerShell, for example, tends to do really well with collections (arrays) of objects. VBS didn’t, and you ended up mucking around with arrays a whole bunch. For example, if my goal was to have:
Name Value Length
----- ------ -------
Base01 Adobe 01
That would simply be an object having three properties. Difficult in VBS, easy as cake in PowerShell. You could easily retrieve just one of them:
$objects | Where Name -eq 'Base01'
Extracting just the specified one from the collection. Collections are also easier to enumerate. You don’t have to keep track of the upper boundary (like you’re doing with X in your snippet); you just add a new object to the collection and PowerShell figures it out.
So… knowing how this is supposed to be used in PowerShell might help me point you in a better direction…