vSphere PowerCLI Reference

Get-Annotation

Synopsis

Retrieves annotations.

Syntax

Get-Annotation [[-CustomAttribute] <CustomAttribute[]>] [-Entity] <InventoryItem> [-Server <VIServer[]>] [<CommonParameters>]
Get-Annotation [-Entity] <InventoryItem> [-Name <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Set-Annotation
Get-CustomAttribute
New-CustomAttribute
Remove-CustomAttribute
Set-CustomAttribute

Detailed Description

Retrieves annotations. An annotation is a user-defined description field of one or more vSphere objects.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
EntityInventoryItemSpecify the entities whose annotations you want to retrieve.truetrue (ByValue)
CustomAttributeCustomAttribute[]Specify the custom attributes whose annotations you want to retrieve.falsefalse
NameString[]Specify the names of the annotations you want to retrieve.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

Annotation[]

Notes

Examples

-------------- Example 1 --------------

Get-Cluster Cluster | Get-Annotation -CustomAttribute PhysicalLocation

Retrieves the annotation of the PhysicalLocation custom attribute for Cluster.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.