PowerCLI Reference

Set-VMHostFirewallException

Synopsis

This cmdlet enables or disables host firewall exceptions.

Syntax

Set-VMHostFirewallException [-Enabled] <Boolean> [-Exception] <VMHostFirewallException[]> [-Confirm] [-WhatIf] [<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.