Get-VIObjectByVIView Command | Vmware PowerCLI Reference

Get-VIObjectByVIView

This cmdlet converts a vSphere View object to a VIObject using the object ID provided by the MoRef parameter. If the View object is a ServiceInstance, you cannot convert it to a VIObject.

Syntax

Get-VIObjectByVIView
-MORef < ManagedObjectReference[] >
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
MORef ManagedObjectReference[] named
  • pipeline
Specifies the managed object ID, obtained from a property of another managed object or a view.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
Get-VIObjectByVIView
-VIView < ViewBase[] >
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VIView ViewBase[] named
  • pipeline
Specifies the vSphere .NET View object you want to convert to a VMware PowerCLI object.
optional ProgressAction ActionPreference named

Output

VMware.VimAutomation.Sdk.Types.V1.VIObject

Examples

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.

Related Commands

VIOAuth2Client

Creates a new OAuth2 client registration with the VMware Identity Broker.

Deletes a registration for a specified OAuth2 client from the VMware Identity Broker.

Updates the configuration of the OAuth2 client registered with the VMware Identity Broker.

VIOAuth2ClientSecretRotation

Forces an immediate secret rotation for a specific OAuth 2 client.

Initiates a rotation of the secret of an OAuth 2 client.

VIOauth2Client

This cmdlet retrieves the OAuth2 clients available on a vCenter Server system.

VIObjectByVIView

This cmdlet converts a vSphere View object to a VIObject.