Syntax
Set-VMHostFirewallException [-Enabled] <Boolean> [-Exception] <VMHostFirewallException[]> [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed 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 objectsNotes
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.