Get-Annotation Command | Vmware PowerCLI Reference

Get-Annotation

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

Syntax

Get-Annotation
-Entity < InventoryItem >
[ [-CustomAttribute ] < CustomAttribute[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Entity InventoryItem named
  • pipeline
  • wildcards
Specifies the entities whose annotations you want to retrieve.
optional CustomAttribute CustomAttribute[] 1
  • wildcards
Specifies the custom attributes whose annotations you want to retrieve.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
Get-Annotation
-Entity < InventoryItem >
[-Name < String[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Entity InventoryItem named
  • pipeline
  • wildcards
Specifies the entities whose annotations you want to retrieve.
optional Name String[] named
  • wildcards
Specifies the names of the annotations you want to retrieve.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

Output

VMware.VimAutomation.ViCore.Types.V1.AnnotationManagement.Annotation

Examples

Example 1

Get-Cluster Cluster | Get-Annotation -CustomAttribute PhysicalLocation

Retrieves the annotation of the PhysicalLocation custom attribute for Cluster.

Example 2

$vm = Get-VM -Name $vmname
Get-Annotation -Entity $vm -CustomAttribute Description

Retrieves the annotation of the Description custom attribute for the $vm virtual machine.

Related Commands

Annotation

This cmdlet retrieves annotations.

This cmdlet modifies the value of a custom attribute.