Поделиться через


MSFT_SmbConnection class

Represents a connection established from an SMB client to an SMB server from the client'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("7")]
class MSFT_SmbConnection
{
  string  ServerName;
  string  ShareName;
  string  UserName;
  uint32  SmbInstance;
  string  Credential;
  uint64  NumOpens;
  string  Dialect;
  boolean ContinuouslyAvailable;
  boolean Encrypted;
  boolean Redirected;
  boolean Signed;
};

Members

The MSFT_SmbConnection class has these types of members:

Methods

The MSFT_SmbConnection class has these methods.

Method Description
Create Establishes a connection to an SMB server.

Properties

The MSFT_SmbConnection class has these properties.

ContinuouslyAvailable

Data type: boolean

Access type: Read-only

True if the connection is continuously available.

Credential

Data type: string

Access type: Read-only

The credential (domain + user name) that was used to establish the connection.

Dialect

Data type: string

Access type: Read-only

The SMB version.

Encrypted

Data type: boolean

Access type: Read-only

Indicates whether the SMB connection is encrypted. For more information, see SMB Encryption.

NumOpens

Data type: uint64

Access type: Read-only

Number of handles opened on the server and share.

Redirected

Data type: boolean

Access type: Read-only

Indicates whether the SMB connection was redirected.

ServerName

Data type: string

Access type: Read-only

Qualifiers: key

The server name.

ShareName

Data type: string

Access type: Read-only

Qualifiers: key

The name of the shared resource to which the connection is established.

Signed

Data type: boolean

Access type: Read-only

Indicates whether the SMB connection is encrypted. If the SMB connection is encrypted (the Encrypted property is True) then the Signed property will be set to False, even though an encrypted connection is also signed. For more information, see Require SMB Security Signatures.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012 and Windows 8: This property is not supported before Windows Server 2016 and Windows 10.

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.

UserName

Data type: string

Access type: Read-only

Qualifiers: key

The user name that was used to establish the connection.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\Smb
MOF
SmbWmiV2.mof
DLL
SmbWmiV2.dll