Thank you.
What I don't understand is that the debugger shows BaseObject
to be of type PSVersionHashTable
; so, why can't I do:
ConsoleWriteLine((result[0].BaseObject)["OS"]);
What works is (as you've explained):
ConsoleWriteLine(((PSVersionHashTable)result[0].BaseObject)["OS"]);
The cast to PSVersionHashTable puzzles me...