Win32_ServerConnection class
The Win32_ServerConnection WMI class represents the connections made from a remote computer to a shared resource on the local computer.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties and methods are in alphabetic order, not MOF order.
Syntax
class Win32_ServerConnection : CIM_LogicalElement
{
uint32 ActiveTime;
string Caption;
string ComputerName;
uint32 ConnectionID;
string Description;
datetime InstallDate;
string Name;
uint32 NumberOfFiles;
uint32 NumberOfUsers;
string ShareName;
string Status;
string UserName;
};
Members
The Win32_ServerConnection class has these types of members:
Properties
The Win32_ServerConnection class has these properties.
- ActiveTime
-
- Data type: uint32
- Access type: Read-only
- Qualifiers: Units (Seconds)
Number of seconds since this connection was established.
- Caption
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen (64)
Short description of the object—a one-line string. This property is inherited from CIM_ManagedSystemElement.
- ComputerName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Name of the computer from which the connection is established.
- ConnectionID
-
- Data type: uint32
- Access type: Read-only
Unique identifier for the connection.
- Description
-
- Data type: string
- Access type: Read/write
Comment that describes the link. This property is inherited from CIM_ManagedSystemElement.
- InstallDate
-
- Data type: datetime
- Access type: Read-only
Date and time when the object was installed. This property does not need a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.
- Name
-
- Data type: string
- Access type: Read-only
Label by which the object is known. When subclassed, the property can be overridden to be a key property. This property is inherited from CIM_ManagedSystemElement.
- NumberOfFiles
-
- Data type: uint32
- Access type: Read-only
Number of open files associated with this connection.
- NumberOfUsers
-
- Data type: uint32
- Access type: Read-only
Number of users associated with this connection.
- ShareName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Share resource to which the connection is established.
- Status
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen (10)
Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly, but predicting a failure in the near future). Nonoperational statuses include: "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 online, yet the managed element is neither "OK" nor in one of the other states. This property is inherited from CIM_ManagedSystemElement.
The values are:
- "OK"
- "Error"
- "Degraded"
- "Unknown"
- "Pred Fail"
- "Starting"
- "Stopping"
- "Service"
- "Stressed"
- "NonRecover"
- "No Contact"
- "Lost Comm"
- UserName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Name of the user that made a connection.
Remarks
The Win32_ServerConnection class is derived from CIM_LogicalElement.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012