Home Reference WMI Reference root CIMV2 Win32_NetworkConnection
 

Win32_NetworkConnection

The Win32_NetworkConnection class represents an active network connection in a Win32 environment.

Quick Start

Properties

In this WMI class, all WMI properties are read-only. You can only read values but not change them.

AccessMask

Data type UInt32

The AccessMask property is a bit array representing the access rights as set remotely on the network share held by the user or group on whose behalf the instance is returned. This property is only supported under Windows NT and Windows 2000.

$FILE_READ_DATAfileorFILE_LIST_DIRECTORYdirectory=1
$FILE_WRITE_DATAfileorFILE_ADD_FILEdirectory=2
$FILE_APPEND_DATAfileorFILE_ADD_SUBDIRECTORYdirectory=4
$FILE_READ_EA=8
$FILE_WRITE_EA=16
$FILE_EXECUTEfileorFILE_TRAVERSEdirectory=32
$FILE_DELETE_CHILDdirectory=64
$FILE_READ_ATTRIBUTES=128
$FILE_WRITE_ATTRIBUTES=256
$DELETE=512
$READ_CONTROL=1024
$WRITE_DAC=2048
$WRITE_OWNER=4096
$SYNCHRONIZE=8192

$AccessMask = $FILE_READ_EA + $FILE_READ_DATAfileorFILE_LIST_DIRECTORYdirectory

Caption

Data type String

The Caption property is a short textual description (one-line string) of the object.

Comment

Data type String

The Comment property contains a comment supplied by the network provider.

ConnectionState

Data type String

The ConnectionState property indicates the current state of the network connection.

'Connected','Error','Paused','Disconnected','Connecting','Reconnecting'

ConnectionType

Data type String

The ConnectionType property indicates the persistence type of the connection used for connecting to the network.

Example: Permanent.

'Current Connection','Persistent Connection'

Description

Data type String

The Description property provides a textual description of the object.

DisplayType

Data type String

The DisplayType property indicates how the network object should be displayed in a network browsing user interface.

Example: Generic.

'Domain','Generic','Server','Share'

InstallDate

Data type DateTime

The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

LocalName

Data type String

The LocalName property indicates the local name of the connected network device.

Example: c:\public.

Name

Data type String

The Name property indicates the name of the current network connection. It is the combination of the value in the RemoteName property and the value in the LocalName property.

Example: \\NTRELEASE (c:\public).

Persistent

Data type Boolean

The Persistent property determines whether this connection will be reconnected automatically by the operating system on the next logon.

Values: $true or $false. A value of $true indicates the network connection will be automatically connected.

ProviderName

Data type String

The ProviderName property contains the name of the provider that owns the resource. This property can be NULL if the provider name is unknown.

RemoteName

Data type String

The RemoteName property contains the remote network resource name for a network resource. For a current or persistent connection, RemoteName contains the network name associated with the name of the value in the LocalName property. The name in RemoteName must follow the network provider’s naming conventions.

Example: \\NTRELEASE.

RemotePath

Data type String

The RemotePath property contains the full path to the network resource.

Example: \\infosrv1\public

ResourceType

Data type String

The ResourceType property identifies the type of resource to enumerate or connect to.

'Disk','Print','Any'

Status

Data type String

The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are “OK”, “Degraded” and “Pred Fail”. “Pred Fail” indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are “Error”, “Starting”, “Stopping” and “Service”. The latter, “Service”, could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither “OK” nor in one of the other states.

'OK','Error','Degraded','Unknown','Pred Fail','Starting','Stopping','Service','Stressed','NonRecover','No Contact','Lost Comm'

UserName

Data type String

The UserName property contains the user name or the default user name used to establish a network connection.

Example: SYSTEM.

Methods

Examples

See Also

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.

Content last updated: 2013-12-27 12:20:41 (UTC).

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin