Search This Blog

2020/07/03

Create array in PowerShell

$hashArray = @{}

If($hashArray[$key] -eq $null) {
$hashArray.add("$key", @{
"key1" = "value"
"key2" = "value"
"key3" = "value"
}
)
}
$hashArray[$key]["key1"]