MSFT_SmbSession class
Represents a session on an SMB server from the server's perspective.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.
Syntax
[dynamic, provider("smbwmiv2"), ClassVersion("30")]
class MSFT_SmbSession
{
uint64 SessionId;
string ScopeName;
string ClusterNodeName;
string ClientComputerName;
string ClientUserName;
uint64 NumOpens;
uint32 SecondsIdle;
uint32 SecondsExists;
string Dialect;
string TransportName;
uint32 SmbInstance;
};
Members
The MSFT_SmbSession class has these types of members:
Methods
The MSFT_SmbSession class has these methods.
Method | Description |
---|---|
ForceClose | Closes all handles opened by the session. Any unsaved data will be lost. |
Properties
The MSFT_SmbSession class has these properties.
-
ClientComputerName
-
-
Data type: string
-
Access type: Read-only
Name of the client computer from which the session was established.
-
-
ClientUserName
-
-
Data type: string
-
Access type: Read-only
Name of the user that established the session.
-
-
ClusterNodeName
-
-
Data type: string
-
Access type: Read-only
Name of the computer that is actually serving this session. This is meaningful when the server is part of a cluster and the scope of the session might be served by several servers in the cluster.
-
-
Dialect
-
-
Data type: string
-
Access type: Read-only
SMB protocol dialect of this session. Depends on the versions of SMB Client and server.
-
-
NumOpens
-
-
Data type: uint64
-
Access type: Read-only
The number of file opens that are currently active in the session.
-
-
ScopeName
-
-
Data type: string
-
Access type: Read-only
Scope name of this session. It can be * (meaning no scope) or a file server resource name (if the server is part of a cluster).
-
-
SecondsExists
-
-
Data type: uint32
-
Access type: Read-only
Number of seconds that have elapsed since the session was created.
-
-
SecondsIdle
-
-
Data type: uint32
-
Access type: Read-only
Number of seconds since the last request was received in the session.
-
-
SessionId
-
-
Data type: uint64
-
Access type: Read-only
-
Qualifiers: key
ID that uniquely identifies the session.
-
-
SmbInstance
-
-
Data type: uint32
-
Access type: Read-only
The identifier of the SMB server instance that hosts the shares.
Windows Server 2012 and Windows 8: This property is not supported before Windows Server 2012 R2 and Windows 8.1.
-
-
Default (0)
-
CSV (1)
-
Represents a Cluster Shared Volume (CSV).
Windows 10 and Windows 8.1: Cluster Shared Volumes are only supported on Windows Server systems.
-
SBL (2)
-
Represents a Software Storage Bus used in Storage Spaces Direct.
Windows Server 2012 R2: This value is not supported before Windows Server 2016.
Windows 10 and Windows 8.1: Storage Spaces Direct is only supported on Windows Server systems.
-
SR (2)
-
Represents a Storage Replica (SR).
Windows Server 2012 R2: This value is not supported before Windows Server 2016.
Windows 10 and Windows 8.1: Storage Replica is only supported on Windows Server systems.
TransportName
-
Data type: string
-
Access type: Read-only
Name of the transport that is being used for the session.
Requirements
Minimum supported client |
Windows 8 |
Minimum supported server |
Windows Server 2012 |
Namespace |
Root\Microsoft\Windows\Smb |
MOF |
|
DLL |
|