Compartilhar via


MSFT_SMFileShare class

Represents a file share.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Windows Server 2012 R2 and Windows Server 2012: This class does not inherit from MSFT_SMStorageObject which is new for Windows Server 2016.

Syntax

[dynamic, provider("WMIStorage"), AMENDMENT]
class MSFT_SMFileShare : MSFT_SMStorageObject
{
  String  ObjectId;
  String  Identifier;
  String  Name;
  String  Description;
  String  Path;
  Boolean IsContinuouslyAvailable;
  UInt16  FileSharingProtocol;
  UInt16  State;
  UInt16  DefaultReadWrite;
  uint16  HealthStatus;
  string  HealthStatusDescription;
};

Members

The MSFT_SMFileShare class has these types of members:

Methods

The MSFT_SMFileShare class has these methods.

Method Description
Delete Deletes a file share.
Diagnose Runs diagnostics on the file share.
GrantAccess Grants the specified users access to the file share.
RevokeAccess Revokes access to the file share for the specified users.

Properties

The MSFT_SMFileShare class has these properties.

DefaultReadWrite

Data type: UInt16

Access type: Read-only

An indicator of the default read/write setting for the file share.

Description

Data type: String

Access type: Read-only

A user configurable description of the file share.

FileSharingProtocol

Data type: UInt16

Access type: Read-only

The file sharing protocol used by the share.

The possible values are.

NFS (2)

SMB (3)

HealthStatus

Data type: uint16

Access type: Read-only

Qualifiers: ArrayType ("Indexed")

Indicates the current status of the file share. Various operational statuses are defined.

Healthy (0)

Warning (1)

Unhealthy (2)

HealthStatusDescription

Data type: string

Access type: Read-only

Indicates the current status of the file share in a string format.

Identifier

Data type: String

Access type: Read-only

Qualifiers: Required

The ID of the logical instance of the object. This ID must be unique within the scope of the storage system.

This property is inherited from MSFT_SMStorageObject.

Windows Server 2012 R2 and Windows Server 2012: This property is present, but is not inherited from MSFT_SMStorageObject .

IsContinuouslyAvailable

Data type: Boolean

Access type: Read-only

Indicates whether the file server is continuously available.

Name

Data type: String

Access type: Read-only

Qualifiers: Required

A human-readable string used to identify the file share. This name must be unique within the scope of the owning file server.

ObjectId

Data type: String

Access type: Read-only

Qualifiers: Key, Required

The ID of this class instance. This ID must be unique within the scope of the Windows Storage Management server that hosts the provider object.

This property is inherited from MSFT_SMStorageObject.

Windows Server 2012 R2 and Windows Server 2012: This property is present, but is not inherited from MSFT_SMStorageObject .

Path

Data type: String

Access type: Read-only

The volume-relative path to the directory that is shared.

State

Data type: UInt16

Access type: Read-only

An indicator of the state of the file share.

Pending

Online

Offline

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\Microsoft\Windows\Storage\SM
MOF
MsftStrgMan.mof
DLL
StorageService.dll

See also

MSFT_SMStorageObject

Windows Storage Management WMI Provider