In short, there are 2 types of objects accessible through PowerCLI.
- The PowerCLI .Net objects. These are returned by PowerCLI cmdlets, and contain a selected set of properties (by the PowerCLI Dev Team).
- The vSphere objects. These are read-only copies of the objects that are used internally by vSphere servers. They are documented in the vSphere Web Services API Reference
The objects of type 2 can be retrieved by the Get-View cmdlet. For example:
Note that the Filter parameter expects a hash table of conditions, where the right-side operand of each key-value pair is a RegEx expression.
Get-View -ViewType VirtualMachine -Filter @{'Name'='^MyVM$'}
Or through the ExtensionData property of objects of type 1. For example
Get-VM -Name MyVM | Select -ExpandProperty ExtensionData
These 2 lines return the same VirtualMachine object.