大网数据广告活动
网络与域名解析

MSFT_NetFirewallProfile class

· 52CE 我爱测

Represents a particular firewall profile. Multiple profiles may be in effect on any interface at any given time.

Represents a particular firewall profile. Multiple profiles may be in effect on any interface at any given time.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

class MSFT_NetFirewallProfile : CIM_ManagedElement
{
  string Name;
  uint16 Enabled;
  uint16 DefaultInboundAction;
  uint16 DefaultOutboundAction;
  uint16 AllowInboundRules;
  uint16 AllowLocalFirewallRules;
  uint16 AllowLocalIPsecRules;
  uint16 AllowUserApps;
  uint16 AllowUserPorts;
  uint16 AllowUnicastResponseToMulticast;
  uint16 NotifyOnListen;
  string LogFileName;
  uint64 LogMaxSizeKilobytes;
  uint16 LogAllowed;
  uint16 LogBlocked;
  uint16 LogIgnored;
  string DisabledInterfaceAliases[];
  uint16 EnableStealthModeForIPsec;
  string InstanceID;
  string Caption;
  string Description;
  string ElementName;
};

Members

The MSFT_NetFirewallProfile class has these types of members:

Properties

The MSFT_NetFirewallProfile class has these properties.

AllowInboundRules

Data type: uint16

Access type: Read-only

If this is true, administrators will be able to create firewall rules which allow unsolicited inbound traffic to be accepted. If this is false, such rules will be ignored.

AllowLocalFirewallRules

Data type: uint16

Access type: Read-only

Determines whether local firewall rules should be merged into the effective policy along with Group Policy settings.

AllowLocalIPsecRules

Data type: uint16

Access type: Read-only

Determines whether local IPsec rules should be merged into the effective policy along with rules from Group Policy.

AllowUnicastResponseToMulticast

Data type: uint16

Access type: Read-only

Whether to allow unicast responses to multicast traffic.

AllowUserApps

Data type: uint16

Access type: Read-only

Whether to respect user allowed applications created in the legacy firewall.

AllowUserPorts

Data type: uint16

Access type: Read-only

Whether to respect globally opened ports created in the legacy firewall.

Caption

Data type: string

Access type: Read-only

Used in CimInstance.ToString(). A short string for describing this instance when debugging.

DefaultInboundAction

Data type: uint16

Access type: Read-only

The default action for Inbound traffic.

DefaultOutboundAction

Data type: uint16

Access type: Read-only

The default action for outbound traffic.

Description

Data type: string

Access type: Read-only

This field is ignored.

DisabledInterfaceAliases

Data type: string array

Access type: Read-only

Interfaces that the firewall profile is disabled on.

ElementName

Data type: string

Access type: Read-only

This field is ignored.

Enabled

Data type: uint16

Access type: Read-only

Whether the firewall is enabled on this profile.

EnableStealthModeForIPsec

Data type: uint16

Access type: Read-only

Whether to use Stealth Mode for IPsec-protected traffic.

InstanceID

Data type: string

Access type: Read-only

Qualifiers: Key, Override

Reserved for internal use by the WMI provider only

LogAllowed

Data type: uint16

Access type: Read-only

Whether to log allowed packets.

LogBlocked

Data type: uint16

Access type: Read-only

Whether to log blocked traffic.

LogFileName

Data type: string

Access type: Read-only

The filename in which to store the firewall log.

LogIgnored

Data type: uint16

Access type: Read-only

Whether to log an event when rules are ignored.

LogMaxSizeKilobytes

Data type: uint64

Access type: Read-only

Maximum size the log file can reach before being rotated. May be a uint32 value, or MAXUINT64 for Not Configured.

Name

Data type: string

Access type: Read-only

The name of the profile.

NotifyOnListen

Data type: uint16

Access type: Read-only

If true, users will be notified when an application listens on a port that is closed.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Namespace Root\StandardCimv2
MOF WFasCim.mof
DLL WFasCim.dll

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors (upstream author metadata: windowssdkdev). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。