PowerCLI Reference

Set-VMHostFirewallException

Synopsis

This cmdlet enables or disables host firewall exceptions.

Syntax

Set-VMHostFirewallException [-Enabled] <Boolean> [-Exception] <VMHostFirewallException[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VMHostFirewallException

Detailed Description

This cmdlet enables or disables host firewall exceptions.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
EnabledBooleanIf the value is $true, the specified firewall exceptions are enabled. If the value is $false, the firewall exceptions are disabled.truefalse
ExceptionVMHostFirewallException[]Specifies the firewall exceptions you want to enable or disable.truetrue (ByValue)
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Zero or more modified VMHostFirewallException objects

Notes

Firewall management functionality is not supported on ESX 3i.

Examples

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

$ftpFirewallExceptions = Get-VMHostFirewallException -VMHost $vmhost | where {$_.Name.StartsWith('FTP')}

$ftpFirewallExceptions | Set-VMHostFirewallException -Enabled $true

Enables the firewall exceptions for the FTP services on the specified host.


Copyright © VMware, Inc. All rights reserved.