Home > Blogs > VMware PowerCLI Blog


ManagedObjectReference Made Easier

PowerCLI 4.1 introduces easier way to initialize ManagedObjectRefernce (MoRef) instances which are necessary while playing with the Get-View cmdlet.

Till now there were several ways to get MoRefs. The most popular one is to get the view object and to use its MoRef property. Another approach is to parse the values of the ID into two parts – type and value.

For example, to convert virtual machine hard disks to thin-provisioned format it is necessary to have the target datastore MoRef:

One thought on “ManagedObjectReference Made Easier

  1. LucD

    Very nice feature.
    Small but a big timesaver

    Reply

Leave a Reply

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

*