Syntax
Get-Annotation -CustomAttribute <CustomAttribute> -Entity <InventoryItem>
I would expect:
(1)
Get-VM | Get-Annotation -CustomAttribute Creator
and
(2)
Get-VM | % {Get-Annotation -CustomAttribute Creator -Entity $_}
to do the same thing but I get only one machine on (1)
AnnotatedEntityId Name Value
VirtualMachine-vm-140 Creator
and for (2) get:
AnnotatedEntityId Name Value
VirtualMachine-vm-140 Creator
VirtualMachine-vm-15844 Creator
VirtualMachine-vm-15834 Creator
etc
Which PowerCLI version are you using ?
Get-PowerCLIVersion
In PowerCLI 4.1 option (1) works for me
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Which PowerCLI version are you using ?
Get-PowerCLIVersion
In PowerCLI 4.1 option (1) works for me
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
mmmm, the version on vCenter is different to my machine
vCenter: 4.0 U1 build 208462
My desktop. 4.1 build 264274
And vCenter is at 4.1 now.
Schoolboy error but thanks!
Tom