Training
Module
Filter objects out of the pipeline - Training
This module explains how to filter objects out of the pipeline by using the Where-Object cmdlet to specify various criteria.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Filters traffic based on its protocol and port.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.
class MSFT_NetProtocolPortFilter : CIM_FilterEntryBase
{
string Protocol;
string RemotePort[];
string LocalPort[];
string IcmpType[];
uint32 DynamicTransport;
string Name;
string SystemCreationClassName;
string SystemName;
string CreationClassName;
boolean IsNegated;
datetime InstallDate;
uint16 OperationalStatus[];
string StatusDescriptions[];
string Status;
uint16 HealthState;
uint16 CommunicationStatus;
uint16 DetailedStatus;
uint16 OperatingStatus;
uint16 PrimaryStatus;
string InstanceID;
string Caption;
string Description;
string ElementName;
};
The MSFT_NetProtocolPortFilter class has these types of members:
The MSFT_NetProtocolPortFilter class has these properties.
Caption
Data type: string
Access type: Read-only
Used in CimInstance.ToString(). A short string for describing this instance when debugging.
CommunicationStatus
Data type: uint16
Access type: Read-only
This field is ignored.
CreationClassName
Data type: string
Access type: Read-only
Reserved for internal use by the WMI provider only.
Description
Data type: string
Access type: Read-only
This field is ignored.
DetailedStatus
Data type: uint16
Access type: Read-only
This field is ignored.
DynamicTransport
Data type: uint32
Access type: Read-only
Allows filtering traffic to/from endpoints by certain kinds of virtual transports, rather than traditional tuples of addresses, protocols, and ports.
0
1
2
4
8
16
ElementName
Data type: string
Access type: Read-only
This field is ignored.
HealthState
Data type: uint16
Access type: Read-only
This field is ignored.
IcmpType
Data type: string array
Access type: Read-only
Applies only when Protocol is ICMPv4 or ICMPv6. ICMP Type/Code pairs this filter applies to. May be an ICMP type (0-255), or an ICMP type/code pair in the format Type.Code, where type and code values are numbers from 0 to 255.
InstallDate
Data type: datetime
Access type: Read-only
This field is ignored.
InstanceID
Data type: string
Access type: Read-only
A string that uniquely identifies this instance within the PolicyStore.
IsNegated
Data type: boolean
Access type: Read-only
This field is ignored.
LocalPort
Data type: string array
Access type: Read-only
Applies only when Protocol is TCP or UDP. Local ports this filter applies to. May be a number or range 0-65535, or one of the following: Any, RPC, RPC-EPMap, IPHTTPSIn, PlayToDiscovery.
Name
Data type: string
Access type: Read-only
Reserved for internal use by the WMI provider only.
OperatingStatus
Data type: uint16
Access type: Read-only
This field is ignored.
OperationalStatus
Data type: uint16 array
Access type: Read-only
This field is ignored.
PrimaryStatus
Data type: uint16
Access type: Read-only
This field is ignored.
Protocol
Data type: string
Access type: Read-only
IP Protocol Number that this filter applies to. May be 0-255 or one of the following: ICMPv4, ICMPv6, TCP, UDP.
RemotePort
Data type: string array
Access type: Read-only
Applies only when Protocol is TCP or UDP. Remote ports this filter applies to. May be a number or range 0-65535, or one of the following: Any, IPHTTPSOut.
Status
Data type: string
Access type: Read-only
This field is ignored.
StatusDescriptions
Data type: string array
Access type: Read-only
This field is ignored.
SystemCreationClassName
Data type: string
Access type: Read-only
Reserved for internal use by the WMI provider only.
SystemName
Data type: string
Access type: Read-only
Reserved for internal use by the WMI provider only.
Minimum supported client |
Windows 8 |
Minimum supported server |
Windows Server 2012 |
Namespace |
Root\StandardCimv2 |
MOF |
|
DLL |
|
Training
Module
Filter objects out of the pipeline - Training
This module explains how to filter objects out of the pipeline by using the Where-Object cmdlet to specify various criteria.