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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Enabled | Boolean | If the value is $true, the specified firewall exceptions are enabled. If the value is $false, the firewall exceptions are disabled. | true | false
Exception | VMHostFirewallException[] | Specifies the firewall exceptions you want to enable or disable. | true | true (ByValue)
Confirm | SwitchParameter | If 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. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

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.