API Reference
Command
Set-CxFirewallProfile
Enables or disables Windows Firewall for selected profiles. Also supports logging and notification/policy tweaks when specified.
Examples
Generated fallback example from command syntax.
Set-CxFirewallProfile -Profile 'Domain'
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-CxFirewallProfile -Profile <Domain|Private|Public|All> [-Enabled <bool>] [-AllowLocalFirewallRules <bool>] [-DisableNotifications <bool>] [-LogDroppedPackets <bool>] [-LogFilePath <string>] [-LogFileSizeKB <int>] [-LogSuccessfulConnections <bool>] [-PassThru] [-Policy] [<CommonParameters>]#Parameters
- Profile FirewallProfileKind
- Profile flags: Domain, Private, Public (or All). Possible values: Domain, Private, Public, All
- Possible values:
Domain,Private,Public,All - Enabled bool
- True to enable, false to disable. If omitted, the firewall Enabled state is not changed.
- AllowLocalFirewallRules bool
- Gets or sets the AllowLocalFirewallRules parameter.
- DisableNotifications bool
- Gets or sets the DisableNotifications parameter.
- LogDroppedPackets bool
- Gets or sets the LogDroppedPackets parameter.
- LogFilePath string
- Gets or sets the LogFilePath parameter.
- LogFileSizeKB int
- Gets or sets the LogFileSizeKB parameter.
- LogSuccessfulConnections bool
- Gets or sets the LogSuccessfulConnections parameter.
- PassThru SwitchParameter
- When set, outputs the detailed result object instead of a simple success boolean.
- Policy SwitchParameter
- Gets or sets the Policy parameter.
Outputs
ComputerX.Firewall.FirewallProfileApplyResult, System.Boolean