2 Responses to Working with vCloud Metadata in PowerCLI – Part 2

  1. Peter Benz says:

    The function GEtCIMetaData replies only the value. Replacing Key -ExpandProperty TypedValue by @{N=”Value”;E={$_.TypedValue.Value} seems to work at least on single VM object like (get-civm -name MyComputer).ExtensionData.GetMetadata().MetadataEntry |Select Key, @{N=”Type”;E={$_.TypedValue.GetType().Name}},
                        @{N=”Visibility”;E={ if ($_.Domain.Visibility) { $_.Domain.Visibility } else { “General” }}}, @{N=”Value”;E={$_.TypedValue.Value}}

  2. P says:

    Thanks Jon for the helpful posts. Curious if you or anyone else reading this has since figured out an easy way to change the Visibility values on existing Key from General to ReadOnly (or vice-versa). And also, how does on Modify an existing Key – not create a new, duplicate key? Trying to figure out how to edit existing values on multiple vApps. Currently I am delete the keys and create new with appropriate values..

    Thank you 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × 5 =