Set-CMWindowsFirewallPolicy

Changes settings of a Windows Firewall policy.

Syntax

Set-CMWindowsFirewallPolicy
   [-Id] <Int32>
   [-Confirm]
   [-Description <String>]
   [-Digest <ConfigurationItem>]
   [-DigestPath <String>]
   [-DigestXml <String>]
   [-DisableWildcardHandling]
   [-DomainBlockAllInboundTraffic <SettingType>]
   [-DomainNotification <SettingType>]
   [-DomainTurnOnFirewall <SettingType>]
   [-ForceWildcardHandling]
   [-NewName <String>]
   [-PassThru]
   [-Priority <PriorityChangeType>]
   [-PrivateBlockAllInboundTraffic <SettingType>]
   [-PrivateNotification <SettingType>]
   [-PrivateTurnOnFirewall <SettingType>]
   [-PublicBlockAllInboundTraffic <SettingType>]
   [-PublicNotification <SettingType>]
   [-PublicTurnOnFirewall <SettingType>]
   [-WhatIf]
   [<CommonParameters>]
Set-CMWindowsFirewallPolicy [-InputObject]  [-Confirm] [-Description ]
 [-Digest ] [-DigestPath ] [-DigestXml ] [-DisableWildcardHandling]
 [-DomainBlockAllInboundTraffic ] [-DomainNotification ]
 [-DomainTurnOnFirewall ] [-ForceWildcardHandling] [-NewName ] [-PassThru]
 [-Priority ] [-PrivateBlockAllInboundTraffic ]
 [-PrivateNotification ] [-PrivateTurnOnFirewall ]
 [-PublicBlockAllInboundTraffic ] [-PublicNotification ]
 [-PublicTurnOnFirewall ] [-WhatIf] []
Set-CMWindowsFirewallPolicy [-Name]  [-Confirm] [-Description ] [-Digest ]
 [-DigestPath ] [-DigestXml ] [-DisableWildcardHandling]
 [-DomainBlockAllInboundTraffic ] [-DomainNotification ]
 [-DomainTurnOnFirewall ] [-ForceWildcardHandling] [-NewName ] [-PassThru]
 [-Priority ] [-PrivateBlockAllInboundTraffic ]
 [-PrivateNotification ] [-PrivateTurnOnFirewall ]
 [-PublicBlockAllInboundTraffic ] [-PublicNotification ]
 [-PublicTurnOnFirewall ] [-WhatIf] []

Description

The Set-CMWindowsFirewallPolicy cmdlet changes settings of one or more Windows Firewall policies for System Center 2016 Endpoint Protection in Microsoft System Center Configuration Manager.

Examples

Example 1: Decrease the priority of a Windows Firewall policy by using a name

PS C:\> Set-CMWindowsFirewallPolicy -Priority Decrease -Name "WFPContoso01"

This command decreases the priority of the Windows Firewall policy named WFPContoso01.

Example 2: Decrease the priority of a Windows Firewall policy by using an ID

PS C:\> Set-CMWindowsFirewallPolicy -Priority Decrease -Id "16777568"

This command decreases the priority of the Windows Firewall policy that has the ID 16777568.

Example 3: Increase the priority of a Windows Firewall policy by using an object variable

PS C:\> $WFPobj=Get-CMWindowsFirewallPolicy -Id "16777568"
PS C:\> Set-CMWindowsFirewallPolicy -Priority Increase -InputObject $WFPobj

The first command gets the CMWindowsFirewallPolicy object that has the ID 16777568 and stores it in the $WFPobj variable.

The second command increases the priority of the Windows Firewall policy stored in the $WFPobj variable.

Required Parameters

-Id

Specifies an array of IDs of firewall policies.

Type:Int32
Aliases:CIId, CI_ID
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a CMWindowsFirewallPolicy object. To obtain a CMWindowsFirewallPolicy object, use the Get-CMWindowsFirewallPolicy cmdlet.

Type:IResultObject
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies an array of firewall policy names.

Type:String
Aliases:LocalizedDisplayName
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the Windows Firewall policy.

Type:String
Aliases:LocalizedDescription
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Digest
Type:ConfigurationItem
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-DigestPath
Type:String
Aliases:DesiredConfigurationDigestPath
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DigestXml
Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DomainBlockAllInboundTraffic

Specifies whether the firewall blocks all incoming traffic for a domain type network location. Valid values are:- No

  • Not Configured
  • Yes
Type:SettingType
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DomainNotification
Type:SettingType
Aliases:DomainNotifications
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DomainTurnOnFirewall

Specifies whether to enable Windows Firewall for domain network location. Valid values are:- No

  • Not Configured
  • Yes
Type:SettingType
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewName

Specifies a new name for the firewall policy.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Priority

Specifies the priority of a firewall policy. Valid values are: Increase and Decrease.

Type:PriorityChangeType
Parameter Sets:Increase, Decrease
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrivateBlockAllInboundTraffic

Specifies whether the firewall blocks all incoming traffic for a private network location. Valid values are:- No

  • Not Configured
  • Yes
Type:SettingType
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrivateNotification
Type:SettingType
Aliases:PrivateNotifications
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrivateTurnOnFirewall

Specifies whether to enable Windows Firewall for a private network location. Valid values are:- No

  • Not Configured
  • Yes
Type:SettingType
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicBlockAllInboundTraffic

Specifies whether the firewall blocks all incoming traffic for a public network location. Valid values are:- No

  • Not Configured
  • Yes
Type:SettingType
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicNotification
Type:SettingType
Aliases:PublicNotifications
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicTurnOnFirewall

Specifies whether to enable Windows Firewall for a public network location. Valid values are:- No

  • Not Configured
  • Yes
Type:SettingType
Parameter Sets:Yes, No, NotConfigured
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False