Valid values for the ViewType parameter of the PowerCLI Get-View cmdlet
July 4, 2011 Leave a comment
The ViewType parameter of the PowerCLI Get-View cmdlet needs a Managed Object Type as value. A list of these Managed Object Types can be found in the VMware vSphere API Reference Documentation.
However not all the Managed Object Types are valid as a value for the Get-View -ViewType parameter. The Get-View documentation doesn’t show you which Managed Object Types you can use. But if you use a Managed Object Type that is not valid, like “Alarm”, you will get an error message that shows you the valid types.
The valid Managed Object Types for the Get-View -ViewType parameter are:
ComputeResource, ClusterComputeResource, Datacenter, Datastore, Network, DistributedVirtualPortgroup, DistributedVirtualSwitch, Folder, HostSystem, ResourcePool, VirtualApp, VirtualMachine, VmwareDistributedVirtualSwitch.
Update for PowerCLI v5.0
With PowerCLI v5.0 the StoragePod Managed Object Type was added to the above list.