Syntax
Remove-VMHostRoute [-VMHostRoute] <VMHostRoute[]> [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet removes host routes.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
VMHostRoute | VMHostRoute[] | Specifies the host routes you want to remove. | true | true (ByValue) | |
Confirm | SwitchParameter | 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. | false | false | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Return Type
NoneNotes
Supported only on ESX 4.1/ vCenter Server 4.1 and later.Examples
-------------- Example 1 --------------
$destIpList = ('192.168.111.101', '192.168.111.102') $routes = Get-VMHostRoute -VMHost ($script:vmhost1, $script:vmhost2) | where {$destIpList -contains $_.Destination.IPAddressToString} Remove-VMHostRoute -VMHostRoute $routes -Confirm:$false
Removes the host routes that have the specified destination IP addresses.