Main example
List instances
# All instances of Win32_NetworkProtocol, with the main properties
Get-CimInstance -ClassName Win32_NetworkProtocol |
Select-Object -Property Name, Description, Status, InstallDateExamples
Filter with WQL
# WQL filter evaluated by the provider: only the instances where ConnectionlessService is TRUE
Get-CimInstance -ClassName Win32_NetworkProtocol -Filter 'ConnectionlessService = TRUE' |
Select-Object -Property Name, Description, Status, InstallDateThe filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Query a remote computer (CIM session)
review before running# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
Get-CimInstance -CimSession $cimSession -ClassName Win32_NetworkProtocol |
Select-Object -Property Name, Description, Status, InstallDate
} finally {
Remove-CimSession -CimSession $cimSession
}WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.
Show the class structure
# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName Win32_NetworkProtocol
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Caption# | string | read | A short textual description of the object. Code | |||||||||||||||||||||||||||||||||||||||
| ConnectionlessService# | boolean | read | Protocol supports connectionless service. A connectionless (datagram) service describes a communications protocol or transport in which data packets are routed independently of each other and may follow different routes and arrive in a different order from that in which they were sent. Conversely, a connection-oriented service provides a virtual circuit through which data packets are received in the same order they were transmitted. If the connection between computers fails, the application is notified. Code | |||||||||||||||||||||||||||||||||||||||
| Description# | string | read | A textual description of the object. Code | |||||||||||||||||||||||||||||||||||||||
| GuaranteesDelivery# | boolean | read | Protocol supports delivery of data packets. If this flag is FALSE, it is uncertain that all of the data sent will reach the intended destination. Code | |||||||||||||||||||||||||||||||||||||||
| GuaranteesSequencing# | boolean | read | Protocol ensures that data will arrive in the order in which it was sent. Be aware that this characteristic does not ensure delivery of the data, only its order. Code | |||||||||||||||||||||||||||||||||||||||
| InstallDate# | datetime | read | Indicates when the object was installed. Lack of a value does not indicate that the object is not installed. Code | |||||||||||||||||||||||||||||||||||||||
| MaximumAddressSize# | uint32 | read | Maximum length of a socket address supported by the protocol. Socket addresses may be items such as a URL ( Unit: characters Code | |||||||||||||||||||||||||||||||||||||||
| MaximumMessageSize# | uint32 | read | Maximum message size supported by the protocol. This is the maximum size of a message that can be sent from or received by the host. For protocols that do not support message framing, the actual maximum size of a message that can be sent to a given address may be less than this value. Unit: characters Code | |||||||||||||||||||||||||||||||||||||||
| MessageOriented# | boolean | read | Protocol is message-oriented. A message-oriented protocol uses packets of data to transfer information. Conversely, stream-oriented protocols transfer data as a continuous stream of bytes. Code | |||||||||||||||||||||||||||||||||||||||
| MinimumAddressSize# | uint32 | read | Minimum length of a socket address supported by the protocol. Unit: characters Code | |||||||||||||||||||||||||||||||||||||||
| Name# key | string | read | Name for the protocol. Example: "TCP/IP" Code | |||||||||||||||||||||||||||||||||||||||
| PseudoStreamOriented# | boolean | read | Protocol is a message-oriented protocol that can receive variable-length data packets or streamed data for all receive operations. This optional ability is useful when an application does not want the protocol to frame messages, and requires stream-oriented characteristics. If TRUE, the protocol is pseudo stream-oriented. Code | |||||||||||||||||||||||||||||||||||||||
| Status# | string | read | String that indicates the current status of the object. Operational and non-operational status can be defined. Operational status can include "OK", "Degraded", and "Pred Fail". "Pred Fail" indicates that an element is functioning properly, but is predicting a failure (for example, a SMART-enabled hard disk drive). Non-operational status can include "Error", "Starting", "Stopping", and "Service". "Service" can apply during disk mirror-resilvering, reloading a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither "OK" nor in one of the other states. Values include the following: Values (12)
Code | |||||||||||||||||||||||||||||||||||||||
| SupportsBroadcasting# | boolean | read | Protocol supports a mechanism for broadcasting messages across the network. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsConnectData# | boolean | read | Protocol allows data to be connected across the network. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsDisconnectData# | boolean | read | Protocol allows data to be disconnected across the network. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsEncryption# | boolean | read | Protocol supports data encryption. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsExpeditedData# | boolean | read | Protocol supports expedited data (also known as urgent data) across the network. Expedited data can bypass flow control and receive priority over normal data packets. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsFragmentation# | boolean | read | Protocol supports transmitting the data in fragments. Physical network maximum transfer unit (MTU) is hidden from applications. Each media type has a maximum frame size that cannot be exceeded. The link layer discovers the MTU and reports it to the protocols used. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsGracefulClosing# | boolean | read | Protocol supports two-phase close operations, also known as "graceful close operations". If not, the protocol supports only abortive close operations. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsGuaranteedBandwidth# | boolean | read | Protocol has a mechanism to establish and maintain a bandwidth. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsMulticasting# | boolean | read | Protocol supports multicasting. Code | |||||||||||||||||||||||||||||||||||||||
| SupportsQualityofService# | boolean | read | Protocol is capable of Quality of Service (QoS) support by the underlying layered service provider or transport carrier. QoS is a collection of components that enable differentiation and preferential treatment for subsets of data transmitted over the network. QoS means subsets of data get higher priority or guaranteed service when traversing a network. Code |
Remarks
The Win32_NetworkProtocol class is derived from CIM_LogicalElement.
Inheritance
Superclass chain
- CIM_ManagedSystemElement
- CIM_LogicalElement
- Win32_NetworkProtocol
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") UUID("{8502C4D8-5FBB-11D2-AAC1-006008C78BC7}") AMENDMENT
Microsoft source
Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.