I am running powercli 5.1 with VUM 5.1 and the ExportCompliancereport that is provided in the documents section. I am getting the error below on almost all of my VM's and I am unsure why?
e 'guestToolsSupportedOld' was not found. At \ExportComplianceToCS V.ps1:160 char:31
n.Commands.GetCompliance |
That problem was mentioned before, see update manager problems (after upgrade from 4.1u2 to 5.0u1)
Does it work when you leave out the Detailed switch ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yeah I found that thread earlier, but I wasn't sure if it was going to be able to get all the properties for the script to work. I will try it with removing the -detailed flag and see if the report works properly.
Hmm ok so no errors when this is ran, but it puts all of them in the VA compliance csv because the type comes out as "VMware.VumAutomation.Types.BaselineCompliance" when not running the detailed. So it puts them in the default bucket VA appliance. Looks like without the "detailed" switch it doesn't get the fullname type to categorize it right. Anyone have anymore thoughts?
foreach ($inventoryItem in $inventoryItems) {
$compliances = Get-Compliance -Entity $inventoryItem
if ($compliances -ne $null) {
foreach ($compliance in $compliances) {
$fullName = $compliance.GetType().FullName
if ($fullName -eq "VMware.VumAutomation.Types.PatchBaselineCompliance") {
$patchBaselineCompliances += $compliance
} elseif ($fullName -eq "VMware.VumAutomation.Types.VMHWUpgradeBaselineCompliance") {
$vmHWUpgradeBaselineCompliances += $compliance
} elseif ($fullName -eq "VMware.VumAutomation.Types.VMToolsUpgradeBaselineCompliance") {
$vmToolsUpgradeBaselineCompliances += $compliance
} elseif ($fullName -eq "VMware.VumAutomation.Types.BaselineCompliance") {
if ($compliance.Baseline.GetType().FullName -eq "VMware.VumAutomation.Types.HostUpgradeBaselineImpl") {
$hostUpgradeBaselineCompliances += $compliance
} else {
$vaUpgradeBaselineCompliances += $compliance
}
}
}
}
}
