Set-VMHostFirewallDefaultPolicy

This cmdlet sets the default policy for the specified host firewall. This policy specifies whether outgoing or incoming connections are allowed. At least one of the AllowIncoming and AllowOutgoing parameters must be set. When you configure the default firewall policy of an ESX/ESXi host version 5.0, you must provide the same value for the AllowIncoming and AllowOutgoing parameters.

Syntax

[-Policy]  <VMHostFirewallDefaultPolicy[]>
[[-AllowOutgoing]  <Boolean>]
[-AllowIncoming  <Boolean>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Policy
VMHostFirewallDefaultPolicy[] 2
  • pipeline
  • Specifies the host firewall default policy you want to apply.
    optional
    AllowOutgoing
    Boolean 1 If the value of this parameter is $true, all outcoming connections are allowed. If the value is $false, all outcoming connections are disallowed.
    optional
    AllowIncoming
    Boolean named If the value of this parameter is $true, all incoming connections are allowed. If the value is $false, all incoming connections are disallowed.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Host.VMHostFirewallDefaultPolicy

    Examples


    Example 1

    $firewallpolicy = Get-VMHostFirewallDefaultPolicy -VMHost 10.23.123.100
    Set-VMHostFirewallDefaultPolicy -Policy $firewallpolicy -AllowOutGoing $true | fl

    Changes the default firewall policy of the virtual machine host with IP address 10.23.123.100, so that the outgoing connections are allowed.

    Related Commands

    Feedback

    Was this page helpful?