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.

Advertisement

About Robert van den Nieuwendijk
Robert van den Nieuwendijk is a freelance senior systems engineer with over 30 years of experience in the IT industry. He focusses on VMware vCloud Suite and Microsoft Windows Server. He tries to automate as much of his work as possible using Microsoft PowerShell. Robert is the author of the books “Learning PowerCLI” and “Learning PowerCLI – Second Edition.” 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 2016, VTSP 2016, VCP4-DCV, VCP5-DCV, VCP6-DCV, VCP6-CMA, VCA-Cloud, VCA-WM, VCA-NV, VMSP, VMTSP, ZCS, ZCP, ZCP-Cloud, MCSE, MCSA, MCP, MCP+I, PRINCE2 Foundation and ITIL Foundation. In 2012, 2013, 2014, 2015, 2016, 2017, 2018 and 2019 Robert received the VMware vExpert award for his contribution to the community of VMware users over the past year. In 2017 Robert also received the VMware vExpert Cloud award. PernixData made him in 2015 a member of the PernixPro.

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: