powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-VMHostFirewallDefaultPolicy



NAME
Set-VMHostFirewallDefaultPolicy

SYNOPSIS
Sets the default policy for the specified host firewall.

SYNTAX
Set-VMHostFirewallDefaultPolicy [[-AllowIncoming] []] [[-AllowOutgoing] []] [-Policy] wallDefaultPolicy[]> [-WhatIf] [-Confirm] []


DESCRIPTION
Sets the default policy for the specified host firewall. This policy specifies whether outgoing or incoming connect
ions are allowed. At least one of the AllowIncoming and AllowOutgoing parameters must be set. When you configure th
e default firewall policy of an ESX host version 5.0, you must provide the same value for the AllowIncoming and All
owOutgoing parameters.


PARAMETERS
-AllowIncoming []
If the value of this parameter is $true, all incoming connections are allowed. If $false, they are disallowed.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-AllowOutgoing []
If the value of this parameter is $true, all outcoming connections are allowed. If $false, they are disallowed.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Policy
Specify a host firewall default policy you want to apply.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? named
Default value $true
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VMHostFirewallDefaultPolicy


NOTES


Firewall management functionality is not supported on ESX 3i.

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

C:\PS>$firewallpolicy = Get-VMHostFirewallDefaultPolicy -VMHost 10.23.123.100

Set-VMHostFirewallDefaultPolicy -Policy $firewallpolicy -AllowOutGoing $true | fl


Changes the default firewall policy of the virtual machine host with IP address 10.23.123.100, so that the outgoing
connections are allowed.


VMHostId : HostSystem-host-8
IncomingEnabled : False
OutgoingEnabled : True
Client : VMware.VimAutomation.Client20.VimClient



RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-VMHostFirewallDefaultPolicy.h
tml
Get-VMHostFirewallDefaultPolicy