Create and fill hash of arrays in Powershell




You can initialize and fill multidimension hashes (arrays) in powershell this way:

$orderIds  = New-Object System.Collections.ArrayList

$orderIds = @{

    ids = @(1,2,3,4,5);

    deps = @('one', 'two', 'three', 'four', 'five')

};



MarkiMarta.com. Notes of web-specialist
Since 2009
18+
Array in PowerShell – create and read

This is an manual how to work with arrays in PowerShell - how to create them, fill and read. You...

Close