We use tags many reports and to allow users to manage information about VM's. We run a script that pulls this information into a spreadsheet.
Running
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PS C\>get-tag computername*
get-tag : 05/03/2018 14:05:32 Get-Tag Unexpected character encountered while parsing value: <. Path '', line 0
,
position 0..
At line:1 char:1
+ get-tag UK-D*
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Tag], CisException
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTag.Err
or,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTag
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PS C:\> $vms = get-vm | where {$_.powerstate -eq "PoweredOn"} | select -first 30
PS C:\> foreach ($vm in $vms) {get-tagassignment -Entity $vm }
get-tagassignment : 05/03/2018 14:07:15 Get-TagAssignment Unexpected character encountered while parsing v
alue: <.
Path '', line 0, position 0..
At line:1 char:24
+ foreach ($vm in $vms) {get-tagassignment -Entity $vm }
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-TagAssignment], CisException
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Impl.V1.Service.Tagging.Cis.TaggingServiceCisImpl.GetTagAssi
gnment.Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Tagging.GetTagAssignment
Any help would be great.