PowerCLI Reference

Remove-TagAssignment

Synopsis

This cmdlet removes the specified tag assignment.

Syntax

Remove-TagAssignment [-TagAssignment] <TagAssignment[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Tag
Get-TagAssignment
New-TagAssignment

Detailed Description

This cmdlet removes the specified tag assignment. The cmdlet removes the assignment of the tag in TagAssignment.Tag from the entity in TagAssignment.Entity.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
TagAssignmentTagAssignment[]Specifies the assigned tags to be removed.truetrue (ByValue)
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
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

None

Notes

Works only with vCenter Server 5.1 or later.

Examples

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

$myVM = Get-VM myvm
$myTagAssignment = Get-TagAssignment $myVM
Remove-TagAssignment $myTagAssignment

Removes all connections to tags from the specified virtual machine entity.


Copyright © VMware, Inc. All rights reserved.