I see that I was trying to combine two differnet arrays into one output, so I need to make two different tables one for each array output.
I have made the following changes it now have 3 columns to hold all the informaiton from the OptionDep object, but now I get nothing in the rows.
$settings = @()
foreach ($a in $vcenterSettings)
{
$b = "" | Select-object OptionDef
$b.key = $a.key
$b.label = $a.label
$b.summary = $a.summary
$settings += $b
}
Then on the row 1
for ($row =0; $row -le ($contents.Count); $row++)
{
$cell = $doctable.cell($row,1).range
$cell.text = $contents.Settings[0].key
}
Then for row 2 everything about and change
$cell.text = $contents.settings[0].label
Th for Row 3
$cell.text = $contents.settings[0].summary