PowerCLI Reference

New-HCXStaticRoute

Synopsis

This cmdlet creates a static route.

Syntax

New-HCXStaticRoute [-Confirm] -Gateway <String> [-MTU <Int32>] -Network <String> [-Server <HcxServer[]>] [-WhatIf] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet creates a static route and provides a static route for the networks that are not reachable through the default gateway. You can create a new Interconnect appliance by using the output of the cmdlet.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ConfirmSwitchParameterIf 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
GatewayStringSpecifies the gateway.trueFalse
MTUInt32Specifies the maximum transmission unit. The default value is 1500 bytes.falseFalse
NetworkStringSpecifies the network of the static route provided in the <network-ip>/<prefix-length> format.trueFalse
ServerHcxServer[]Specifies the HCX Server systems 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 the Connect-HCXServer cmdlet.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

VMware.VimAutomation.Hcx.Types.V1.HCXStaticRoute

Notes

Examples

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

PS C:\> New-HCXStaticRoute -Network 192.168.100.0/24 -Gateway 192.168.0.1

Creates a static route.


Copyright © VMware, Inc. All rights reserved.