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 is possible in javascript. Or at least
$a = get-name-id-pair()
$a["id"]
$a["name"]
like is possible in php. Can I do that with powershell?
also
$a = @{'foo'='bar'}
or
$a = @{}
$a.foo = 'bar'