Remove-VMHostRoute

This cmdlet removes host routes.

Syntax

-VMHostRoute  <VMHostRoute[]>
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VMHostRoute
VMHostRoute[] named
  • pipeline
  • Specifies the host routes you want to remove.

    Output

    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.

    Related Commands

    Feedback

    Was this page helpful?