PowerShell Logo Small

Set-NetFirewallProfile



This is the built-in help made by Microsoft for the command 'Set-NetFirewallProfile', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' 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 [<SwitchParameter>]] [-AllowInboundRules <GpoBoolean>] [-AllowLocalFirewallRules <GpoBoolean>]
[-AllowLocalIPsecRules <GpoBoolean>] [-AllowUnicastResponseToMulticast <GpoBoolean>] [-AllowUserApps <GpoBoolean>] [-AllowUserPorts
<GpoBoolean>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-DefaultInboundAction <Action>] [-DefaultOutboundAction <Action>]
[-DisabledInterfaceAliases <String[]>] [-Enabled <GpoBoolean>] [-EnableStealthModeForIPsec <GpoBoolean>] [-GPOSession <String>] [-LogAllowed
<GpoBoolean>] [-LogBlocked <GpoBoolean>] [-LogFileName <String>] [-LogIgnored <GpoBoolean>] [-LogMaxSizeKilobytes <UInt64>] [-NotifyOnListen
<GpoBoolean>] [-PassThru [<SwitchParameter>]] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<CommonParameters>]
Set-NetFirewallProfile [-AllowInboundRules <GpoBoolean>] [-AllowLocalFirewallRules <GpoBoolean>] [-AllowLocalIPsecRules <GpoBoolean>]
[-AllowUnicastResponseToMulticast <GpoBoolean>] [-AllowUserApps <GpoBoolean>] [-AllowUserPorts <GpoBoolean>] [-AsJob [<SwitchParameter>]]
[-CimSession <CimSession[]>] [-DefaultInboundAction <Action>] [-DefaultOutboundAction <Action>] [-DisabledInterfaceAliases <String[]>]
[-Enabled <GpoBoolean>] [-EnableStealthModeForIPsec <GpoBoolean>] [-LogAllowed <GpoBoolean>] [-LogBlocked <GpoBoolean>] [-LogFileName
<String>] [-LogIgnored <GpoBoolean>] [-LogMaxSizeKilobytes <UInt64>] [-NotifyOnListen <GpoBoolean>] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Set-NetFirewallProfile [-Name] <String[]> [-AllowInboundRules <GpoBoolean>] [-AllowLocalFirewallRules <GpoBoolean>] [-AllowLocalIPsecRules
<GpoBoolean>] [-AllowUnicastResponseToMulticast <GpoBoolean>] [-AllowUserApps <GpoBoolean>] [-AllowUserPorts <GpoBoolean>] [-AsJob
[<SwitchParameter>]] [-CimSession <CimSession[]>] [-DefaultInboundAction <Action>] [-DefaultOutboundAction <Action>]
[-DisabledInterfaceAliases <String[]>] [-Enabled <GpoBoolean>] [-EnableStealthModeForIPsec <GpoBoolean>] [-GPOSession <String>] [-LogAllowed
<GpoBoolean>] [-LogBlocked <GpoBoolean>] [-LogFileName <String>] [-LogIgnored <GpoBoolean>] [-LogMaxSizeKilobytes <UInt64>] [-NotifyOnListen
<GpoBoolean>] [-PassThru [<SwitchParameter>]] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<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. This 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

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 %SystemRoot%\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 is blocked from receiving inbound connections. This cmdlet allows unicast response to multi-cast or broadcast network
traffic, and specifies logging settings for troubleshooting.




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.