MSFT_SmbShare class
Represents an SMB share.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.
Syntax
class MSFT_SmbShare
{
string Name;
string ScopeName;
boolean Scoped;
uint32 ShareType;
boolean Special;
boolean Temporary;
boolean ShadowCopy;
string Path;
string Volume;
string Description;
uint32 ConcurrentUserLimit;
uint32 CurrentUsers;
string SecurityDescriptor;
boolean EncryptData;
uint32 FolderEnumerationMode;
uint32 CachingMode;
boolean ContinuouslyAvailable;
uint32 CATimeout;
uint32 ShareState;
uint32 ClusterType;
};
Members
The MSFT_SmbShare class has these types of members:
Methods
The MSFT_SmbShare class has these methods.
| Method | Description |
|---|---|
| BlockAccess |
Updates a share's security descriptor to block accounts from accessing a share. |
| CreateShare |
Creates a new share and allows the creator to specify initial access rights that determine who can and can’t access the newly created share. |
| EnumerateShares |
Enumerates the specified shares. |
| FireShareChangeEvent |
This method is reserved for system use. |
| GetAccessControlEntries |
Retrieves the access rights that have been granted to the share. |
| GetShare |
Returns a specified share instance. |
| GrantAccess |
Updates a share's security descriptor to grant accounts permission to access a share. |
| RevokeAccess |
Updates a share's security descriptor to revoke permission to access a share from a set of accounts. |
| UnblockAccess |
Updates a share's security descriptor to unblock accounts from accessing a share. |
Properties
The MSFT_SmbShare class has these properties.
- CachingMode
-
- Data type: uint32
- Access type: Read/write
The caching policy for the share.
- None (0)
- Manual (1)
- Documents (2)
- Programs (3)
- BranchCache (4)
- Unknown (5)
- CATimeout
-
- Data type: uint32
- Access type: Read/write
In case of a failover, the number of seconds the client will wait before failing the operation.
- ClusterType
-
- Data type: uint32
- Access type: Read-only
The Failover Clustering type of the share.
- None (0)
- Traditional (1)
- Scale-out (2)
- CSV (3)
- DFS (4)
- ConcurrentUserLimit
-
- Data type: uint32
- Access type: Read/write
Maximum number of users that may concurrently access the share. If this property is zero, there is no limit.
- ContinuouslyAvailable
-
- Data type: boolean
- Access type: Read/write
Indicates whether the share supports continuous availability.
- CurrentUsers
-
- Data type: uint32
- Access type: Read/write
Number of users that are currently connected to this share.
- Description
-
- Data type: string
- Access type: Read/write
Optional description of the share.
- EncryptData
-
- Data type: boolean
- Access type: Read/write
Indicates whether the data on the share should be encrypted.
- FolderEnumerationMode
-
- Data type: uint32
- Access type: Read/write
The enumeration mode that is enabled for the share.
Value Meaning - AccessBased
- 0
Access-based
- Unrestricted
- 1
Unrestricted
- Name
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Name of the share.
- Path
-
- Data type: string
- Access type: Read-only
Absolute path to the file system directory that is shared. Null if ShareType is not File System Directory.
- Scoped
-
- Data type: boolean
- Access type: Read-only
Indicates whether the share is scoped.
- ScopeName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Name of the endpoint to which the share is scoped.
- SecurityDescriptor
-
- Data type: string
- Access type: Read/write
SDDL-formatted security descriptor for the share.
- ShadowCopy
-
- Data type: boolean
- Access type: Read-only
Indicates whether the share represents a shadow copy for Remote VSS for File Shares (RVSS).
- ShareState
-
- Data type: uint32
- Access type: Read-only
The current state of the share.
- Pending (0)
- Online (1)
- Offline (2)
- ShareType
-
- Data type: uint32
- Access type: Read-only
Indicates the type of resource that is shared.
- Special
-
- Data type: boolean
- Access type: Read-only
Indicates whether this is a special share.
- Temporary
-
- Data type: boolean
- Access type: Read-only
Indicates whether this is a temporary share.
- Volume
-
- Data type: string
- Access type: Read-only
Name of the volume that hosts the directory specified by Path. This name can be a volume mount point. For more information, see Naming a Volume.
NullShareType is not File System Directory.
Remarks
There will be one instance of this class per existing share on the system.
Requirements
|
Minimum supported client | Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps only] |
|
Namespace |
\ROOT\Microsoft\Windows\Smb |
|
MOF |
|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 11/5/2012
