7 Replies Latest reply on Aug 8, 2011 1:50 PM by apuckett

    Setting annotations / custom fields directly via VM object

    marc045 Novice

      Hi All,

       

      How can I set the value of an annotation / customfield directly via the VM object?

       

      $myVM.CustomFields holds all the customfields, how do I update a value via $myVM.CustomFields?

       

      e.g. To retrieve a value I can do:

       

      $myValue = $myVM.customfields | where { $_.key -eq 'myField' } | select -expandproperty value

       

      This is significantly faster than get-annotation.

       

      How do I SET the value via the same mechanism?

       

      Regards

      marc0