I am writing a function that returns an id, name pair.
I would like to do something like
$a = get-name-id-pair() $a.Id $a.Name
like
Will add also the way to iterate through hashtable, as I was looking for the solution and did not found one...
$c = @{"1"="one";"2"="two"} foreach($g in $c.Keys){write-host $c[$g]} #where key = $g and value = $c[$g]