vSphere PowerCLI Cmdlets Reference

Set-VMGuestRoute

Synopsis

Configures the specified route.

Syntax

Set-VMGuestRoute -VMGuestRoute <VMGuestRoute[]> [[-Netmask] <String>] [[-Gateway] <IPAddress>] [-ToolsWaitSecs <Int32>] [-GuestPassword <SecureString>] [-GuestUser <String>] [-GuestCredential <PSCredential>] [-HostPassword <SecureString>] [-HostUser <String>] [-HostCredential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMGuestRoute
New-VMGuestRoute
Remove-VMGuestRoute

Detailed Description

Configures the specified route. At least one of the RouteNetmask, RouteGateway, and RouteInterface parameters must be specified. This cmdlet supports only Windows XP, Windows Server 2003, and Linux RedHat Enterprise 5. You can enhance this cmdlet to support other guest operating systems by modifying or adding custom scripts. The custom scripts are located in the "Scripts" folder in the PowerCLI installation directory and their names have the following format:

<CmdletName>_<OS_Identifier>

<OSIdentifier> is the guest family or the guest ID as returned by Get-VMGuest.
<CmdletName> is the name of the cmdlet without a hyphen, for example RemoveVMGuestRoute.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
VMGuestRouteSpecify the route you want to configure.truetrue (ByValue)
NetmaskConfigures the net mask for the route.falsefalse
GatewayConfigures the gateway for the route.falsefalse
ToolsWaitSecsSpecify the time in seconds to wait for a response from the VMware Tools. If a non-positive value is provided, the system waits infinitely long time.falsefalse
GuestPasswordSpecify the password you want to use for authenticating with the guest OS.falsefalse
GuestUserSpecify the user name you want to use for authenticating with the guest OS.falsefalse
GuestCredentialSpecify a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this parameter if the -GuestUser and -GuestPassword parameters are used.falsefalse
HostPasswordSpecify the password you want to use for authenticating with the host.falsefalse
HostUserSpecify the user name you want to use for authenticating with the host.falsefalse
HostCredentialSpecify a PSCredential object that contains credentials for authenticating with the host. Do not use this parameter if the -HostUser and -HostPassword parameters are used.falsefalse
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true

Return Type

VMGuestRoute

Notes

Supported on ESX 3.5 Update 2 and newer. Consider that this functionality i s experimental.

Examples

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

Set-VMGuestRoute -VMGuestRoute $script:vmGuestRoute -HostUser Admin -HostPassword pass01 -GuestUser User -GuestPassword pass02 -Gateway 192.168.1.1 -Netmask 255.255.255.0 -ToolsWaitSecs 100

Changes the net mask and the gateway of the specified guest route.


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