< Back

Get-VMHostFirewallException

Sun Jan 19, 2020 6:55 pm

NAME 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>]





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

-Enabled <Boolean>

Indicates whether you want to retrieve only the enabled hosts firewall exceptions.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String[]>

Specifies the names of the firewall exceptions you want to retrieve.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Port <Int32[]>

Specifies the number of the port for which you want to retrieve the firewall exceptions.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-VMHost <VMHost[]>

Specifies the hosts for which you want to retrieve firewall exceptions.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more VMHostFirewallException objects







NOTES





Firewall management functionality is not supported on ESX 3i.



-------------------------- 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 LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... ption.html

Set-VMHostFirewallException