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

Re: Get virtual machine details from specified cluster using Get-View

$
0
0

Hi,

MoRef ID is the managed object Reference ID. There is a nice blogpost from Danilo here, How to (quickly) match a moRef ID to a name in VMware vSphere | Danilo Chiavari. Please go through it for more detail. For your reference the difference between the two is, when you access MoRef, you are accessing the referenced object but accessing the ID gives the Id of the Object itself and hence is a String. For this example it will not make much difference. But the actual difference will be when you access the API's and try to do something or build an object. Because the Id will refer to the object itself but the MoRef may be same as the ID or different as the object may in turn reference another object.

Image 003.png

For details about this you can check Chapter 9 (Managing the vSphere API) of the book Mastering PowerCLI (http://bit.ly/1Nafgjh). Though it does not make much difference in your example but to be on the safer side I will work with the ID

Hope this answers your question.


Viewing all articles
Browse latest Browse all 168455

Trending Articles



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