When you setup your custom data class, add all the attributes you want to collect for the Hotfix (eg: HotFixID, Description, InstalledDate, etc...) As you build them, note what column number the attribute is, starting at 0. When you go to set your fields, the number after the opening bracket is the column number. For Hotfixes you build your data class as above and then loop through each hotfix and insert the data like this:
$hotfixes = Get-HotFix
foreach ($hotfix in $hotfixes)
{
#Add new row of data
$objDataRow = $objDataClass.AddRow()
#popluate columns
$objDataRow.SetField(0,$hotfix.HotFixID)
$objDataRow.SetField(1,$hotfix.Description)
$objDataRow.SetField(2,$hotfix.InstallDate)
}
Let me know if you need any other help with it. If this solved your problem can you mark me as solution.
Thanks,
Jason