Hi Matt,
I totally agree. The documentation that I have found from VMware on Get-view is very sparse.
I am still finding out interesting things about the VMware API and how it's mapped out.
(Please note, I am making this explanation so that others that might not be as familiar are also able to understand how it works :-)
I would suggest prototyping your get-view by starting with just 1 VM as a test to get the information you need.
Replace <name of VM> with an actual name of a VM in your environment.
1) Open PowerCli
2) Connect to one VCenter
3) Use get-view to retrieve information of 1 VM in your environment.
$VM = Get-view -viewtype virtualmachine -filter @{'name' = '<name of VM>'}
4)The results of that call return an "Object" and allow you access information and do things with it.
The easiest way to get used to the structure is to think the Object like a Folder (Directory) in a computer.
Inside a folder there could be:
1) Files
2) Subfolders
3) Executables
4) Shortcuts to other folders
5) Hidden files and folders
Inside an Object there are things very similar:
1) Attributes (think files )
2) Other Objects (think subfolder)
3) Methods (think Executables or powershell scripts)
4) Linked Views (think shortcuts)
5) References to other objects that haven't called (think hidden files)
Just to get used to how things are organized, start looking around as if it were a folder you were looking at in a command prompt only instead of a "\" or "/" use a "."
Example:
$VM is the Virtual Machine view returned by :
$VM = Get-view -viewtype virtualmachine -filter @{'name' = '<name of VM>'}
The Name of that VM would be:
$VM.Name
The Memory setting of that VM would be in the following:
$VM.config.Hardware.MemoryMB
When you start getting into using the UpdateViewData command , it gets a little more complicated.
It's like putting "Shortcut Folder" into the Object "Folder" that points to other things.
Example:
In order to get the name of ESXi Host that this VM is running on you would need to use the UpdateView Method to "Create a shortcut" to the ESXi Host properties.
$VM.UpdateViewData("Runtime.Host.Name")
The to access it ,you go through the LinkedView "Shortcut" to it put in $VM.Runtime.
The path to Host name would be:
$VM.Runtime.LinkedView.Host.Name
I hope that helps out a bit :-)