Valid values for the ViewType parameter of the PowerCLI Get-View cmdlet

PowerCLI logoThe 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.

About these ads

About Robert van den Nieuwendijk
Robert van den Nieuwendijk is a freelance senior systems engineer with over 25 years of experience in the IT industry. His main focus is VMware vSphere and Microsoft Windows Server. He tries to automate as much of his work as possible using Microsoft Windows PowerShell. Robert is the author of the book “Learning PowerCLI”. Robert is a frequent contributor and moderator at the VMware VMTN Communities. He has a bachelor degree in software engineering and holds the following IT certifications and accreditations: VSP 5, VTSP 5, VCP4-DCV, VCP5-DCV, VCA-Cloud, VCA-WM, MCSE, MCSA, MCP, MCP+I, and ITIL Foundation. In 2012, 2013 and in 2014 Robert received the VMware vExpert title for his contribution to the community of VMware users over the past year.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 773 other followers

%d bloggers like this: