Looping over a hash table

suggest change
$hashTable = @{
    Key1 = 'Value1'
    Key2 = 'Value2'
}

foreach($key in $hashTable.Keys)
{
    $value = $hashTable.$key
    Write-Output "$key : $value"
}
#Output
Key1 : Value1
Key2 : Value2

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents