Set-Annotation
This cmdlet modifies the value of a custom attribute that applies to one or more inventory items.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
CustomAttribute | CustomAttribute | 1 |
|
Specifies the custom attribute whose annotation you want to change. |
required
|
Value | String | 2 |
|
Specifies a new value for the annotation. |
required
|
Entity | InventoryItem[] | named |
|
Specifies the entities to which the new annotation value applies. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
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.AnnotationExamples
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.