Hi everybody
I want to generate a compliance report for our hosts and execute a command similar to "Get-Compliance -Entity <hostname> | Select-Object Entity, Baseline". I expect to have the same output as for "Get-Compliance -Entity <hostname>" exept for the missing "Status" column. Instead I get allways the same entry (VMware.VumAutomation.Types.PatchBaselineImpl) in all the "Baseline" column.
Any idea what I am doing wrong.
Thank's in advance for any help
Pedro
Hi Pedro,
try it like this:
Get-Compliance -Entity <hostname> | Select-Object Entity,@{N="Baseline";E={$_.Baseline.Name}}
The problem is that the Baseline property is an object not a string. If you pipe it to Select-Object it tries to make a string out of it. And the string it generates is the type of the object.
Regards, Robert
Hi Pedro,
try it like this:
Get-Compliance -Entity <hostname> | Select-Object Entity,@{N="Baseline";E={$_.Baseline.Name}}
The problem is that the Baseline property is an object not a string. If you pipe it to Select-Object it tries to make a string out of it. And the string it generates is the type of the object.
Regards, Robert
Hi Robert
Thank's for the answer. This works as expected.
Cheers,
Pedro