vSphere PowerCLI Cmdlets Reference

Get-EsxCli

Synopsis

Exposes the ESX CLI functionality.

Syntax

Get-EsxCli [[-Server] <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-EsxTop

Detailed Description

Exposes the ESX CLI functionality.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
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.falsetrue (ByValue)

Return Type

EsxCli

Notes

Examples

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

$esxcli = Get-EsxCli -Server $global:DefaultVIServer

Retrieve ESX CLI from the default ESX connection.

-------------- Example 2 --------------

$esxcli.nmp.device.list($null)

Invoke a method of an Esx CLI object by using PowerClI Esx CLI wrapper and specifying $null for a non-required parameter.

-------------- Example 3 --------------

$esxcli.nmp.device.setpolicy($null, "naa.60060160b0402000f03655712a12de11", "VMW_PSP_MRU")

Invoke a method of an ESX CLI object by using PowerCli ESX CLI wrapper and specifying values for the parameter.

-------------- Example 4 --------------

$esxcli.TypeManager.QueryMoInstances($null)

Retrieve a list of the available managed object instances (namespaces with their classes).

-------------- Example 5 --------------

$moTypeInfo = $esxcli.TypeManager.QueryTypeInfo("vim.EsxCLI.nmp.device")

Retrieve information for a specific managed object type (vim.EsxCLI.nmp.device).

-------------- Example 6 --------------

$moInstance.InvokeOperation("list", $null)

Invoke a method on a specific managed object instance. The first argument is the name of the method, the second one is a hash table with parameters if any - in this case $null.


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