API Reference
Command
Set-CxFirewallDefault
Sets the default inbound and outbound firewall action for the selected profiles.
Examples
Example 1: Blocks inbound traffic on the public profile while leaving outbound unchanged.
PS>
Set-CxFirewallDefault -Profile Public -Inbound Block
Example 2: Applies a stricter domain profile default that blocks inbound and allows outbound traffic.
PS>
Set-CxFirewallDefault -Profile Domain -Inbound Block -Outbound Allow
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Set-CxFirewallDefault -Profile <Domain|Private|Public|All> [-Inbound <Block|Allow>] [-Outbound <Block|Allow>] [<CommonParameters>]#Parameters
- Profile FirewallProfileKind
- Profile flags: Domain, Private, Public (or All). Possible values: Domain, Private, Public, All
- Possible values:
Domain,Private,Public,All - Inbound FirewallAction
- Default inbound action (Allow or Block). Optional; omit to leave unchanged. Possible values: Block, Allow
- Possible values:
Block,Allow - Outbound FirewallAction
- Default outbound action (Allow or Block). Optional; omit to leave unchanged. Possible values: Block, Allow
- Possible values:
Block,Allow