powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-VMHostFirewallException



NAME
Get-VMHostFirewallException

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

SYNTAX
Get-VMHostFirewallException [[-Name] ] [-VMHost] [-Port ] [-Enabled []] [-Se
rver ] []


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
-Name
Specify the names of the firewall exceptions you want to retrieve.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? true

-VMHost
Specify the hosts for which you want to retrieve firewall exceptions.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Port
Specify the number of the port for which you want to retrieve the firewall exceptions.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Enabled []
Indicate whether you want to retrieve only the enabled hosts firewall exceptions.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specifies a vSphere server to search for the specified vSphere .NET object. If no value is given to this parame
ter, the command runs on the server currently specified in the $DefaultVIServer variable.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VMHostFirewallException


NOTES


Firewall management functionality is not supported on ESX 3i.

-------------- Example 1 --------------

C:\PS>Get-VMHost -Name VMHost1 | Get-VMHostFirewallException -Enabled:$true


Retrieves the enabled firewall exceptions of a host named VMHost1.





-------------- Example 2 --------------

C:\PS>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 --------------

C:\PS>Get-VMHostFirewallException -VMHost Host -Port 21


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-VMHostFirewallException.html
Set-VMHostFirewallException