{"id":436,"date":"2013-05-22T12:40:08","date_gmt":"2013-05-22T02:40:08","guid":{"rendered":"http:\/\/threemillion.net\/blog\/?p=436"},"modified":"2015-06-02T13:57:38","modified_gmt":"2015-06-02T03:57:38","slug":"what-are-the-valid-get-view-viewtypes","status":"publish","type":"post","link":"https:\/\/threemillion.net\/blog\/?p=436","title":{"rendered":"What are the valid Get-View ViewTypes?"},"content":{"rendered":"<p>Whilst playing with Get-View today I could not work out what I needed as the ViewType for ESXi hosts. Since VirtualMachine is fairly self explanatory I figured it must be VMHost or just Host. Wrong. Either way the error was very helpful in letting me know what the valid options were. See below.<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS &gt; Get-View -ViewType VMHost\r\nGet-View : Cannot validate argument on parameter 'ViewType'. Accepted types: ClusterComputeResource, ComputeResource, D\r\natacenter, Datastore, DistributedVirtualPortgroup, DistributedVirtualSwitch, Folder, HostSystem, Network, ResourcePool,\r\nStoragePod, VirtualApp, VirtualMachine, VmwareDistributedVirtualSwitch\r\n<\/pre>\n<p>Accepted types (formatted nicely):<\/p>\n<ul>\n<li>ClusterComputeResource<\/li>\n<li>ComputeResource<\/li>\n<li>Datacenter<\/li>\n<li>Datastore<\/li>\n<li>DistributedVirtualPortgroup<\/li>\n<li>DistributedVirtualSwitch<\/li>\n<li>Folder<\/li>\n<li>HostSystem<\/li>\n<li>Network<\/li>\n<li>ResourcePool<\/li>\n<li>StoragePod<\/li>\n<li>VirtualApp<\/li>\n<li>VirtualMachine<\/li>\n<li>VmwareDistributedVirtualSwitch<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Whilst playing with Get-View today I could not work out what I needed as the ViewType for ESXi hosts. Since VirtualMachine is fairly self explanatory I figured it must be <a href=\"https:\/\/threemillion.net\/blog\/?p=436\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[49,8,18],"tags":[55],"class_list":["entry","author-admin","post-436","post","type-post","status-publish","format-standard","category-powercli","category-powershell","category-vmware-virtualisation","tag-get-view"],"_links":{"self":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=436"}],"version-history":[{"count":2,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/436\/revisions"}],"predecessor-version":[{"id":438,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/436\/revisions\/438"}],"wp:attachment":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}