Edit

Share via


New-CMWindowsFirewallPolicy

Creates a new Windows Firewall policy in Configuration Manager.

Syntax

Default (Default)

New-CMWindowsFirewallPolicy
    [-Description <String>]
    [-DomainBlockAllInboundTraffic <SettingType>]
    [-DomainNotification <SettingType>]
    [-DomainTurnOnFirewall <SettingType>]
    -Name <String>
    [-PrivateBlockAllInboundTraffic <SettingType>]
    [-PrivateNotification <SettingType>]
    [-PrivateTurnOnFirewall <SettingType>]
    [-PublicBlockAllInboundTraffic <SettingType>]
    [-PublicNotification <SettingType>]
    [-PublicTurnOnFirewall <SettingType>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-CMWindowsFirewallPolicy cmdlet creates a configuration policy for Windows Firewall in Configuration Manager.

Windows Firewall allows or denies incoming connections to an IP address. The blocking actions allow or deny incoming traffic based on a network ___location type. The network ___location types are: ___domain, public, and private.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Create a Windows Firewall policy

PS XYZ:\> New-CMWindowsFirewallPolicy -Name "test01" -Description "323132" -DomainTurnOnFirewall Yes -PrivateTurnOnFirewall Yes -PublicTurnOnFirewall Yes

This command creates a new Windows Firewall policy and enables the firewall for ___domain, private, and public network ___location types.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Specifies a description for the firewall policy.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LocalizedDescription

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainBlockAllInboundTraffic

Specifies whether to block all incoming traffic for a ___domain type of network ___location.The acceptable values for this parameter are:

  • No
  • Not Configured
  • Yes

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainNotification

The New-CMWindowsFirewallPolicy cmdlet creates a configuration policy for Windows Firewall in Configuration Manager.

Windows Firewall allows or denies incoming connections to an IP address. The blocking actions allow or deny incoming traffic based on a network ___location type. The network ___location types are: ___domain, public, and private.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False
Aliases:DomainNotifications

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainTurnOnFirewall

Specifies whether to turn on a firewall for a ___domain type of network ___location. The acceptable values for this parameter are:

  • No
  • Not Configured
  • Yes

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies a name for the firewall policy in Configuration Manager.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LocalizedDisplayName

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivateBlockAllInboundTraffic

Specifies whether to block all incoming traffic for a private type of network ___location. The acceptable values for this parameter are:

  • No
  • Not Configured
  • Yes

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivateNotification

The New-CMWindowsFirewallPolicy cmdlet creates a configuration policy for Windows Firewall in Configuration Manager.

Windows Firewall allows or denies incoming connections to an IP address. The blocking actions allow or deny incoming traffic based on a network ___location type. The network ___location types are: ___domain, public, and private.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False
Aliases:PrivateNotifications

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivateTurnOnFirewall

Specifies whether to turn on a firewall for a private type of network ___location. The acceptable values for this parameter are:

  • No
  • Not Configured
  • Yes

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublicBlockAllInboundTraffic

Specifies whether to block all incoming traffic for a public type of network ___location. The acceptable values for this parameter are:

  • No
  • Not Configured
  • Yes

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublicNotification

The New-CMWindowsFirewallPolicy cmdlet creates a configuration policy for Windows Firewall in Configuration Manager.

Windows Firewall allows or denies incoming connections to an IP address. The blocking actions allow or deny incoming traffic based on a network ___location type. The network ___location types are: ___domain, public, and private.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False
Aliases:PublicNotifications

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublicTurnOnFirewall

Specifies whether to enable Windows Firewall for a public network ___location. The acceptable values for this parameter are:

  • No
  • Not Configured
  • Yes

Parameter properties

Type:SettingType
Default value:None
Accepted values:Yes, No, NotConfigured
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

IResultObject