PowerCLI Reference



This cmdlet enables or disables host firewall exceptions.


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

Related Commands

Online Version

Detailed Description

This cmdlet enables or disables host firewall exceptions.


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


Firewall management functionality is not supported on ESX 3i.


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