Get-VMHostFirewallException

This cmdlet retrieves the exceptions from the firewall policy on the specified hosts. The exceptions can be filtered using the VMHost, Name, Port, and Enabled parameters.

Syntax

[-VMHost]  <VMHost[]>
[-Enabled  <Boolean>]
[-Name  <String[]>]
[-Port  <Int32[]>]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VMHost
VMHost[] 1
  • wildcards
  • pipeline
  • Specifies the hosts for which you want to retrieve firewall exceptions.
    optional
    Enabled
    Boolean named Indicates whether you want to retrieve only the enabled hosts firewall exceptions.
    optional
    Name
    String[] named
  • wildcards
  • Specifies the names of the firewall exceptions you want to retrieve.
    optional
    Port
    Int32[] named Specifies the number of the port for which you want to retrieve the firewall exceptions.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Host.VMHostFirewallException

    Examples


    Example 1

    Get-VMHost -Name VMHost1 | Get-VMHostFirewallException -Enabled:$true

    Retrieves the enabled firewall exceptions of a host named VMHost1.

    Example 2

    Get-VMHostFirewallException "SSH Server", "SSH Client" -VMHost $vmhost

    Retrieves the firewall exceptions for the SSH server and client for the virtual machine host $vmhost.

    Example 3

    Get-VMHostFirewallException -VMHost Host -Port 21

    Retrieves the firewall exceptions of a host named Host. Only firewall exceptions which have port 21 in their incoming port or outgoing ports are returned.

    Related Commands

    Feedback

    Was this page helpful?