PowerNSX has Remove-NsxSecurityTagAssignment but that removes all tags. I want to remove a single NSX Security TAG from a Single VM.
#This line will remove all TAGS from VM
Get-VM VM01 | Get-NsxSecurityTagAssignment | Remove-NsxSecurityTagAssignment
#This line will display only one tag
Get-VM VM01 | Get-NsxSecuritytagassignment | select-object @{Name="SecurityTag"; expression = {$_.securitytag.name}}, VirtualMachine | Where-Object {$_.SecurityTag -like '*SecurityTag01*'}
#This line will display only one tag but remove doesn’t work.
Get-VM TempWin2012R2 | Get-NsxSecuritytagassignment | select-object @{Name="SecurityTag"; expression = {$_.securitytag.name}}, VirtualMachine | Where-Object {$_.SecurityTag -like '*SecurityTag01*'} | Remove-NsxSecurityTagAssignment
Any help would be appreciated.