vSphere PowerCLI Reference

Get-VMHostFirewallException

Synopsis

Retrieves the exceptions from the firewall policy on the specified hosts.

Syntax

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

Related Commands

Online version
Set-VMHostFirewallException

Detailed Description

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[]Specify the names of the firewall exceptions you want to retrieve.falsefalse
VMHostVMHost[]Specify the hosts for which you want to retrieve firewall exceptions.truetrue (ByValue)
EnabledBooleanIndicate whether you want to retrieve only the enabled hosts firewall exceptions.falsefalse
PortInt32[]Specify the number of the port for which you want to retrieve the firewall exceptions.falsefalse
ServerVIServer[]Specifies a vSphere server to search for the specified vSphere .NET object. If no value is given to this parameter, the command runs on the server currently specified in the $DefaultVIServer variable.falsefalse

Return Type

VMHostFirewallException

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 $host

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

-------------- 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 © 1998 - 2012 VMware, Inc. All rights reserved.