PowerCLI Reference

Get-VMHostFirewallException

Synopsis

This cmdlet retrieves the exceptions from the firewall policy on the specified hosts.

Syntax

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

Related Commands

Online Version
Set-VMHostFirewallException

Detailed 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

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the names of the firewall exceptions you want to retrieve.falseFalse
VMHostVMHost[]Specifies the hosts for which you want to retrieve firewall exceptions.trueTrue (ByValue)
EnabledBooleanIndicates whether you want to retrieve only the enabled hosts firewall exceptions.falseFalse
PortInt32[]Specifies the number of the port for which you want to retrieve the firewall exceptions.falseFalse
ServerVIServer[]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.falseFalse

Return Type

Zero or more VMHostFirewallException objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.