Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232869

Re: update virtual machine custom attribute

$
0
0

Hi, what I believe is the problem this the following;

 

$tmp.name when parsed to set-Annotation is simply a string.  I think we set-Annotation attempts to update a customAttribute it first does some sort of lookup and finds two server names for the value of $tmp.name.  I assume this due to the error it throws "set-annotation expects a sigle value.  multiple values have been supplied"

 

set-Annotation -entity $tmp.name -customAttribute "Update Group" -value  $updateGroup

 

As a workaroud I now call the foreach twice within the script, disconnecting from the first VC server and connecting to the second VC server before the next foreach.

 

I would imagin a better way exists, but for the moment this will suffice.


Viewing all articles
Browse latest Browse all 232869

Trending Articles



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