Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Viewing all articles
Browse latest Browse all 16717

PowerCLI 10 - Get-tag and get-tagassignment are not working as expected.

$
0
0

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.


Viewing all articles
Browse latest Browse all 16717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>