TestimoX

API Reference

Command

Set-CxFirewallProfile

Namespace ComputerX.PowerShell
Outputs
ComputerX.Firewall.FirewallProfileApplyResult System.Boolean

Enables or disables Windows Firewall for selected profiles. Also supports logging and notification/policy tweaks when specified.

Examples

Generated fallback example

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 requiredposition: 0pipeline: falsevalues: 4
Profile flags: Domain, Private, Public (or All). Possible values: Domain, Private, Public, All
Possible values: Domain, Private, Public, All
Enabled bool optionalposition: 1pipeline: false
True to enable, false to disable. If omitted, the firewall Enabled state is not changed.
AllowLocalFirewallRules bool optionalposition: namedpipeline: false
Gets or sets the AllowLocalFirewallRules parameter.
DisableNotifications bool optionalposition: namedpipeline: false
Gets or sets the DisableNotifications parameter.
LogDroppedPackets bool optionalposition: namedpipeline: false
Gets or sets the LogDroppedPackets parameter.
LogFilePath string optionalposition: namedpipeline: false
Gets or sets the LogFilePath parameter.
LogFileSizeKB int optionalposition: namedpipeline: false
Gets or sets the LogFileSizeKB parameter.
LogSuccessfulConnections bool optionalposition: namedpipeline: false
Gets or sets the LogSuccessfulConnections parameter.
PassThru SwitchParameter optionalposition: namedpipeline: false
When set, outputs the detailed result object instead of a simple success boolean.
Policy SwitchParameter optionalposition: namedpipeline: false
Gets or sets the Policy parameter.

Outputs

ComputerX.Firewall.FirewallProfileApplyResult, System.Boolean