Set-CMWindowsFirewallPolicy
Updated: March 1, 2013
Applies To: System Center 2012 Configuration Manager SP1
Set-CMWindowsFirewallPolicy
Syntax
Parameter Set: SearchByNameMandatory Set-CMWindowsFirewallPolicy -Name <String[]> [-Description <String> ] [-DomainBlockAllInboundTraffic <SettingType> ] [-DomainNotifications <SettingType> ] [-DomainTurnOnFirewall <SettingType> ] [-NewName <String> ] [-PrivateBlockAllInboundTraffic <SettingType> ] [-PrivateNotifications <SettingType> ] [-PrivateTurnOnFirewall <SettingType> ] [-PublicBlockAllInboundTraffic <SettingType> ] [-PublicNotifications <SettingType> ] [-PublicTurnOnFirewall <SettingType> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SearchByIdMandatory Set-CMWindowsFirewallPolicy -Id <String[]> [-Description <String> ] [-DomainBlockAllInboundTraffic <SettingType> ] [-DomainNotifications <SettingType> ] [-DomainTurnOnFirewall <SettingType> ] [-NewName <String> ] [-PrivateBlockAllInboundTraffic <SettingType> ] [-PrivateNotifications <SettingType> ] [-PrivateTurnOnFirewall <SettingType> ] [-PublicBlockAllInboundTraffic <SettingType> ] [-PublicNotifications <SettingType> ] [-PublicTurnOnFirewall <SettingType> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SearchByValueMandatory Set-CMWindowsFirewallPolicy -InputObject <IResultObject> [-Description <String> ] [-DomainBlockAllInboundTraffic <SettingType> ] [-DomainNotifications <SettingType> ] [-DomainTurnOnFirewall <SettingType> ] [-NewName <String> ] [-PrivateBlockAllInboundTraffic <SettingType> ] [-PrivateNotifications <SettingType> ] [-PrivateTurnOnFirewall <SettingType> ] [-PublicBlockAllInboundTraffic <SettingType> ] [-PublicNotifications <SettingType> ] [-PublicTurnOnFirewall <SettingType> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SetById Set-CMWindowsFirewallPolicy -Id <String[]> -Priority <PriorityChangeType> [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SetByName Set-CMWindowsFirewallPolicy -Name <String[]> -Priority <PriorityChangeType> [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: SetByValue Set-CMWindowsFirewallPolicy -InputObject <IResultObject> -Priority <PriorityChangeType> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-CMWindowsFirewallPolicy cmdlet changes settings of one or more Windows Firewall policies for Microsoft System Center 2012 Endpoint Protection in Microsoft System Center 2012 Configuration Manager.
Parameters
-Description<String>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-DomainBlockAllInboundTraffic<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-DomainNotifications<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-DomainTurnOnFirewall<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Id<String[]>
Specifies an array of IDs of firewall policies.
Aliases | CIId |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-InputObject<IResultObject>
Specifies a CMWindowsFirewallPolicy object. To obtain a CMWindowsFirewallPolicy object, use the Get-CMWindowsFirewallPolicy cmdlet.
Aliases | none |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Name<String[]>
Specifies an array of firewall policy names.
Aliases | LocalizedDisplayName |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-NewName<String>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Priority<PriorityChangeType>
Sets the priority of a firewall policy. Valid values are Increase and Decrease.
Aliases | none |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-PrivateBlockAllInboundTraffic<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-PrivateNotifications<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-PrivateTurnOnFirewall<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-PublicBlockAllInboundTraffic<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-PublicNotifications<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-PublicTurnOnFirewall<SettingType>
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Confirm
Prompts you for confirmation before executing the command.
Required? | false |
Position? | named |
Default Value | false |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
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.
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: Decrease the priority of a Windows Firewall policy by using a name
This command decreases the priority of the Windows Firewall policy named WFPContoso01.
PS C:\> Set-CMWindowsFirewallPolicy -Priority Decrease -Name "WFPContoso01"
Example 2: Decrease the priority of a Windows Firewall policy by using an ID
This command decreases the priority of the Windows Firewall policy that has the ID 16777568.
PS C:\> Set-CMWindowsFirewallPolicy -Priority Decrease -ID "16777568"
Example 3: Increase the priority of a Windows Firewall policy by using an object variable
In this example, the first command gets the CMWindowsFirewallPolicy object that has the ID 16777568 and stores it in the $WFPobj variable.
The second command decreases the priority of the Windows Firewall policy stored in the $WFPobj variable.
PS C:\> $WFPobj=Get-CMWindowsFirewallPolicy -ID "16777568"PS C:\>Set-CMWindowsFirewallPolicy -Priority increase -InputObject $WFPobj
