vSphere PowerCLI Cmdlets Reference

Set-Annotation

Synopsis

Changes the name of the specified annotation.

Syntax

Set-Annotation [-Entity] <InventoryItem> [-CustomAttribute] <CustomAttribute> [-Value] <String> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

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

Detailed Description

Changes the name of the specified annotation.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
EntityInventoryItemSpecify the entities to which the new annotation value applies.truetrue (ByValue)
CustomAttributeCustomAttributeSpecify the custom attribute whose annotation you want to change.truetrue (ByValue)
ValueStringSpecify a new value for the annotation.truefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
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
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Annotation

Notes

Examples

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

Set-Annotation -Entity $host -CustomAttribute "PhysicalLocation" -Value SofiaOffice

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

-------------- Example 2 --------------

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

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


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