PowerShell Logo Small

Set-NetFirewallProfile



This is the built-in help made by Microsoft for the command 'Set-NetFirewallProfile', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Configures settings that apply to the per-profile configurations of the Windows Firewall with Advanced Security.

SYNTAX


Set-NetFirewallProfile [-All] [-AllowInboundRules <GpoBoolean>] [-AllowLocalFirewallRules <GpoBoolean>] [-AllowLocalIPsecRules <GpoBoolean>] [-AllowUnicastResponseToM
ulticast <GpoBoolean>] [-AllowUserApps <GpoBoolean>] [-AllowUserPorts <GpoBoolean>] [-AsJob] [-CimSession <CimSession[]>] [-DefaultInboundAction <Action>] [-DefaultOu
tboundAction <Action>] [-DisabledInterfaceAliases <String[]>] [-Enabled <GpoBoolean>] [-EnableStealthModeForIPsec <GpoBoolean>] [-GPOSession <String>] [-LogAllowed <G
poBoolean>] [-LogBlocked <GpoBoolean>] [-LogFileName <String>] [-LogIgnored <GpoBoolean>] [-LogMaxSizeKilobytes <UInt64>] [-NotifyOnListen <GpoBoolean>] [-PassThru] [
-PolicyStore <String>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-NetFirewallProfile [-AllowInboundRules <GpoBoolean>] [-AllowLocalFirewallRules <GpoBoolean>] [-AllowLocalIPsecRules <GpoBoolean>] [-AllowUnicastResponseToMulticas
t <GpoBoolean>] [-AllowUserApps <GpoBoolean>] [-AllowUserPorts <GpoBoolean>] [-AsJob] [-CimSession <CimSession[]>] [-DefaultInboundAction <Action>] [-DefaultOutboundA
ction <Action>] [-DisabledInterfaceAliases <String[]>] [-Enabled <GpoBoolean>] [-EnableStealthModeForIPsec <GpoBoolean>] [-LogAllowed <GpoBoolean>] [-LogBlocked <GpoB
oolean>] [-LogFileName <String>] [-LogIgnored <GpoBoolean>] [-LogMaxSizeKilobytes <UInt64>] [-NotifyOnListen <GpoBoolean>] [-PassThru] [-ThrottleLimit <Int32>] -Input
Object <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Set-NetFirewallProfile [-Name] <String[]> [-AllowInboundRules <GpoBoolean>] [-AllowLocalFirewallRules <GpoBoolean>] [-AllowLocalIPsecRules <GpoBoolean>] [-AllowUnicas
tResponseToMulticast <GpoBoolean>] [-AllowUserApps <GpoBoolean>] [-AllowUserPorts <GpoBoolean>] [-AsJob] [-CimSession <CimSession[]>] [-DefaultInboundAction <Action>]
[-DefaultOutboundAction <Action>] [-DisabledInterfaceAliases <String[]>] [-Enabled <GpoBoolean>] [-EnableStealthModeForIPsec <GpoBoolean>] [-GPOSession <String>] [-L
ogAllowed <GpoBoolean>] [-LogBlocked <GpoBoolean>] [-LogFileName <String>] [-LogIgnored <GpoBoolean>] [-LogMaxSizeKilobytes <UInt64>] [-NotifyOnListen <GpoBoolean>] [
-PassThru] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-NetFirewallProfile cmdlet configures options for the profiles, including domain, public, and private, that are global, or associated with the input rules. Thi
s cmdlet displays information that is presented on the Windows Firewall with Advanced Security Properties page, with the tabs for domain, private, and public profiles
. This cmdlet configures the states, default actions, and logging properties on a per-profile basis.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=288215
Copy-NetIPsecRule
Get-NetFirewallProfile
New-NetIPsecRule
Open-NetGPO
Save-NetGPO
Set-NetFirewallRule
Set-NetIPsecRule
New-GPO

REMARKS

<

Examples


Example 1

PS C:\>Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True



This example enables the Windows Firewall on the local computer.




Example 2

PS C:\>Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow –NotifyOnListen True -AllowUnicastResponseToMulticast True –LogFileName %System
Root%\System32\LogFiles\Firewall\pfirewall.log



This example sets the default inbound and outbound actions, specifies protected network connections, allows notifications to be displayed to the user when a program i
s blocked from receiving inbound connections. This cmdlet allows unicast response to multi-cast or broadcast network traffic, and specifies logging settings for troub
leshooting.




Example 3

PS C:\>Set-NetFirewallProfile –Name Domain –DefaultInboundAction Block



This example modifies the default inbound action of the domain profile.




Example 4

PS C:\>$nfProfile = Get-NetFirewallProfile –Name Private –PolicyStore corp.contoso.com/gpo_name



PS C:\>Set-NetFirewallProfile –AllowUnicastResponseToMulticast True –InputObject $nfProfile


This cmdlet can be run using only the pipeline.
PS C:\>Get-NetFirewallProfile –Name Private –PolicyStore corp.contoso.com/gpo_name | Set-NetFirewallProfile –AllowUnicastResponseToMulticast True



This example modifies the private profile associated with a GPO.




Example 5

PS C:\>$nfProfile = Get-NetFirewallRule –DisplayName "Unicast Rule" | Get-NetFirewallProfile



PS C:\>Set-NetFirewallProfile –AllowUnicastResponseToMulticast True –InputObject $nfProfile


This cmdlet can be run using only the pipeline.
PS C:\>Get-NetFirewallRule –DisplayName "Unicast Rule" | Get-NetFirewallProfile | Set-NetFirewallProfile –AllowUnicastResponseToMulticast True



This example modifies the profiles associated with a firewall rule.