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