vSphere PowerCLI Reference



Converts a vSphere .Net View object to a PowerShell VIObject.


Get-VIObjectByVIView [-VIView] <ViewBase[]> [<CommonParameters>]
Get-VIObjectByVIView [-Server <VIServer[]>] [-MORef] <ManagedObjectReference[]> [<CommonParameters>]

Related Commands

Online version

Detailed Description

Converts a vSphere .Net View object to a PowerShell VIObject using the object ID provided by the MoRef parameter.


NameTypeDescriptionRequired?Pipeline InputDefault Value
MORefManagedObjectReference[]Specify the managed object ID, obtained from a property of another managed object or a view.truetrue (ByValue)
VIViewViewBase[]Specify the vSphere .NET View object you want to convert to a vSphere PowerCLI object.truetrue (ByValue)
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type




-------------- Example 1 --------------

$view = Get-VM VM | Stop-VM | Get-View  $vm = Get-VIObjectByVIView $view | Start-VM

Gets the VM virtual machine, stops it, and gets its view object. Then, the command gets the virtual machine object using the Get-VIObjectByVIView cmdlet and starts the VM virtual machine.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.