powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-VIObjectByVIView



NAME
Get-VIObjectByVIView

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

SYNTAX
Get-VIObjectByVIView [-VIView] []

Get-VIObjectByVIView [-Server ] [-MORef] []


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


PARAMETERS
-VIView
Specify the vSphere .NET View object you want to convert to a vSphere PowerCLI object.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-MORef
Specify the managed object ID, obtained from a property of another managed object or a view.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VIObject


NOTES




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

C:\PS>$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 LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-VIObjectByVIView.html
Get-View