Syntax
Get-VMHostFirewallException [[-Name] <String[]>] [-VMHost] <VMHost[]> [-Port <Int32[]>] [-Enabled <Boolean>] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
Online versionDetailed Description
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.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String[] | Specifies the names of the firewall exceptions you want to retrieve. | false | false | |
VMHost | VMHost[] | Specifies the hosts for which you want to retrieve firewall exceptions. | true | true (ByValue) | |
Enabled | Boolean | Indicates whether you want to retrieve only the enabled hosts firewall exceptions. | false | false | |
Port | Int32[] | Specifies the number of the port for which you want to retrieve the firewall exceptions. | false | false | |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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. | false | false |
Return Type
Zero or more VMHostFirewallException objectsNotes
Firewall management functionality is not supported on ESX 3i.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.