Hey guy,
Have a quick question to see if I can get some feedback.
I am needing to create an 'object' that has multiple attributes associated with it. Much like a HashTable, but instead of it only having a 'Name' and 'Value' that can be accessed, (I am probally not using the right wording but you can get an idea of what I need for my end result from my example) I need to create something in powershell that is an object that can have multiple items to access such as
$object1 = ("headerItem1", "headerItem2", "headerItem3", "headerItem4")
$object1.add ("testrow1a", "testrow1b", "testrow1c", "testrow1d")
$object1.add ("testrow2a", "testrow2b", "testrow2c", "testrow2d")
And I would like to be able to access it like you would any other PowerShell object - such as
$object1.HeaderItem1
and it would return
testrow1a
testrow2a
Let me know what you think, or if anyone can offer assistance. [I know I can do it through creating a CSV, but I don't want to do it through that, I would like to create an Object, and then access it from there.)