Set-Annotation Command | Vmware PowerCLI Reference

Set-Annotation

This cmdlet modifies the value of a custom attribute that applies to one or more inventory items.

Syntax

Set-Annotation
[ -CustomAttribute ] < CustomAttribute >
[ -Value ] < String >
-Entity < Annotatable[] >
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
CustomAttribute CustomAttribute 1
  • pipeline
  • wildcards
Specifies the custom attribute whose annotation you want to change.
required
Value String 2
Specifies a new value for the annotation.
required
Entity Annotatable[] named
  • pipeline
  • wildcards
Specifies the entities to which the new annotation value applies. Supported entity types are VirtualMachine, ResourcePool, Folder, VMHost, Cluster, Datacenter, VApp, OpaqueNetwork, Network, DatastoreCluster, Datastore, DistributedSwitch, DistributedPortGroup
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

Set-Annotation -Entity $vmhost -CustomAttribute "PhysicalLocation" -Value Office

Modifies the annotation of the PhysicalLocation custom attribute for the host stored in the $vmhost variable.

Example 2

Get-Cluster Cluster | Set-Annotation -CustomAttribute "PhysicalLocation" -Value California

Modifies the annotation of the PhysicalLocation custom attribute for the Cluster cluster.

Related Commands

Annotation

This cmdlet retrieves annotations.

This cmdlet modifies the value of a custom attribute.