< Back

Set-Annotation

Sun Jan 19, 2020 7:07 pm

NAME Set-Annotation



SYNOPSIS

This cmdlet modifies the value of a custom attribute.





SYNTAX

Set-Annotation [-Entity] <InventoryItem[]> [-CustomAttribute] <CustomAttribute> [-Value] <String> [-Server

<VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-CustomAttribute <CustomAttribute>

Specifies the custom attribute whose annotation you want to change.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Entity <InventoryItem[]>

Specifies the entities to which the new annotation value applies.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Server <VIServer[]>

Specifies the vCenter Server systems 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Value <String>

Specifies a new value for the annotation.



Required? true

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If 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.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more modified Annotation objects







NOTES









-------------------------- 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 LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... ation.html

Get-Annotation

Get-CustomAttribute

New-CustomAttribute

Remove-CustomAttribute

Set-CustomAttribute