New-CMWindowsFirewallPolicy
New-CMWindowsFirewallPolicy
Creates a new Windows Firewall policy in Configuration Manager.
Syntax
Parameter Set: New
New-CMWindowsFirewallPolicy -Name <String> [-Description <String> ] [-DomainBlockAllInboundTraffic <SettingType> {No | NotConfigured | Yes} ] [-DomainNotifications <SettingType> {No | NotConfigured | Yes} ] [-DomainTurnOnFirewall <SettingType> {No | NotConfigured | Yes} ] [-PrivateBlockAllInboundTraffic <SettingType> {No | NotConfigured | Yes} ] [-PrivateNotifications <SettingType> {No | NotConfigured | Yes} ] [-PrivateTurnOnFirewall <SettingType> {No | NotConfigured | Yes} ] [-PublicBlockAllInboundTraffic <SettingType> {No | NotConfigured | Yes} ] [-PublicNotifications <SettingType> {No | NotConfigured | Yes} ] [-PublicTurnOnFirewall <SettingType> {No | NotConfigured | Yes} ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The New-CMWindowsFirewallPolicy cmdlet creates a configuration policy for Windows Firewall in Microsoft System Center 2012 SP1 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.
Parameters
-Description<String>
Specifies a description for the firewall policy.
Aliases |
LocalizedDescription |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DomainBlockAllInboundTraffic<SettingType>
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
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DomainNotifications<SettingType>
Specifies whether to enable notifications for a domain type of network location. The acceptable values for this parameter are:
-- No
-- Not Configured
-- Yes
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DomainTurnOnFirewall<SettingType>
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
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies a name for the firewall policy in Configuration Manager.
Aliases |
LocalizedDisplayName |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PrivateBlockAllInboundTraffic<SettingType>
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
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PrivateNotifications<SettingType>
Specifies whether to enable notifications for a private type of network location. The acceptable values for this parameter are:
-- No
-- Not Configured
-- Yes
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PrivateTurnOnFirewall<SettingType>
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
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PublicBlockAllInboundTraffic<SettingType>
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
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PublicNotifications<SettingType>
Specifies whether Configuration Manager sends notifications to public network locations. The acceptable values for this parameter are:
-- No
-- Not Configured
-- Yes
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PublicTurnOnFirewall<SettingType>
Specifies whether to enable Windows Firewall for a public network location. The acceptable values for this parameter are:
-- No
-- Not Configured
-- Yes
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Create a Windows Firewall policy
This command creates a new Windows Firewall policy and enables the firewall for domain, private, and public network location types.
PS C:\> New-CMWindowsFirewallPolicy -Name "test01" -Description "323132" -DomainTurnOnFirewall Yes -PrivateTurnOnFirewall Yes -PublicTurnOnFirewall Yes