powershellscripts.com

Tutorials  PowerShell Cmdlet Help for New-VMGuestRoute



NAME
New-VMGuestRoute

SYNOPSIS
Adds a new route to the routing table of the provided virtual machines and guests.

SYNTAX
New-VMGuestRoute [-VM ] [-Destination] [[-Netmask] ] [-Gateway] [
-Interface ] [-VMGuest ] [-Server ] [-ToolsWaitSecs ] [-GuestPassword String>] [-GuestUser ] [-GuestCredential ] [-HostPassword ] [-HostUser
] [-HostCredential ] [-WhatIf] [-Confirm] []


DESCRIPTION
Adds a new route to the routing table of the provided virtual machines and guests. The cmdlet adds only persistent
routes. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2,
Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.


PARAMETERS
-VM
Specify the virtual machines to which you want to add the new route.

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

-Destination
Specify a destination IP address for the new route.

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

-Netmask
Specify a net mask for the new route.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Gateway
Specify a gateway for the new route.

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

-Interface
Specify a network interface for the new route. For Linux guest operating systems, this parameter is mandatory.

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

-VMGuest
Specify the guests to which you want to add the new route.

Required? false
Position? named
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

-ToolsWaitSecs
Specify 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.

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

-GuestPassword
Specify the password you want to use for authenticating with the guest OS.

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

-GuestUser
Specify the user name you want to use for authenticating with the guest OS.

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

-GuestCredential
Specify a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this p
arameter if the -GuestUser and -GuestPassword parameters are used.

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

-HostPassword
Specify the password you want to use for authenticating with the host. You need to specify host credentials onl
y if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX versi
on you have installed is earlier than 1.10.

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

-HostUser
Specify the user name you want to use for authenticating with the host. You need to specify host credentials on
ly if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX vers
ion you have installed is earlier than 1.10.

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

-HostCredential
Specify a PSCredential object that contains credentials for authenticating with the host. Do not use this param
eter if the -HostUser and -HostPassword parameters are used. You need to specify host credentials only if the v
ersion of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you hav
e installed is earlier than 1.10.

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

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

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

-Confirm
If 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.

Required? false
Position? named
Default value $true
Accept pipeline input? false
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
VMGuestRoute


NOTES


Supported on ESX 3.5 Update 2 and newer. Consider that New-VMGuestRoute might behave inconsistently and create
different types of routes depending on the OS type - Windows or Linux.
This cmdlet works only in 32-bit mode.
This cmdlet is experimental and might be changed or removed in a future release.

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

C:\PS>New-VMGuestRoute -HostUser admin -HostPassword pass1 -GuestUser user -GuestPassword pass2 -VM $vm -Destinatio
n '192.168.100.10' -Netmask '255.255.255.255' -Gateway '10.23.112.58'


Creates a new guest route with the specified parameters.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/New-VMGuestRoute.html
Get-VMGuestRoute
Remove-VMGuestRoute