Windows 7 / Getting Started

Types of SMB shares

New SMB shares can be provisioned in your environment using either Server Manager or Windows PowerShell. You have three options to choose from when creating SMB shares using the New Share Wizard:

  • Quick Choose this option if you need to create a general-purpose SMB share for file sharing. This option enables caching of the share by default and allows you to enable access-based enumeration and to encrypt data access if desired. You can also enable BranchCache on the share if the BranchCache feature is installed on the server.
  • Advanced Choose this option if you will need to configure quotas on your share or implement file classification. This option also enables caching of the share by default and allows you to enable access-based enumeration and to encrypt data access if desired. You can also enable BranchCache on the share if the BranchCache feature is installed on the server.
  • Applications Choose this option if the share will be used by Hyper-V hosts for shared storage, by a database application, and for other server applications. This option allows you to encrypt data access if desired, but you cannot enable caching or enable access-based enumeration on the share.

Creating general-purpose SMB shares

To create a new general-purpose SMB share on a volume using Server Manager, perform the following steps:

  1. Launch the New Share Wizard-for example, by right-clicking on the volume named Archive Volume.
  2. Select the SMB Share - Quick option.
  3. Select a volume on a file server-for example, the 2-TB volume named Archive Volume that was provisioned using Storage Spaces in the previous section of this lesson.
  4. Type a name for the new share. By default, a new local folder will be created for the share in the following location:
    <volume>\Shares\<share_name>
    For example, if you specify Archive Share as the name for the new share being created on the E volume, the following local folder will be created for the new share:
    E:\Shares\Archive Folder
  5. If access-based enumeration is desired, enable it on the share.
  6. If you want to, disable caching on the share. (Caching is enabled by default.) If you leave caching enabled and the BranchCache feature is installed on the server, you can enable BranchCache on the share if desired.
  7. If you want to, enable encrypted data access on the share.
  8. Review the permissions for the new share. If you want to, open the Advanced Security Settings dialog box and modify the permissions as needed.
  9. Click Next, and complete the remaining steps of the wizard to create the new share.

You can also use Windows PowerShell to create new general-purpose SMB shares on a volume. For example, you could start by using the New-Item cmdlet to create a local folder named E:\Shares\Archived Content for your new share:

PS C:\> New-Item -Path "E:\Shares\Archived Content" -ItemType Directory

    Directory: E:\Shares

Mode 		LastWriteTime 	Length Name
---- 		------------- 	------ ----
d----       8/20/2012 8:55 PM 	Archived Content

You could then use the New-SmbShare cmdlet to create a new share named Archive Share that maps to the local folder and assign the shared folder permission Change to the CONTOSO\Sales group as follows:

PS C:\> New-SmbShare -Name "Archive Share" -Path "E:\Shares\Archived Content" `
-ChangeAccess CONTOSO\Sales

Name 		ScopeName   Path 			  Description
---- 		---------   ---- 			  -----------
Archive Share 	* 	    E:\Shares\Archived Content

If you later decide you want to enable access-based enumeration on your new share, you could use the Set-SmbShare cmdlet to do it like this:

PS C:\> Set-SmbShare -Name "Archive Share" -FolderEnumerationMode AccessBased ` -Confirm:$false

The -Confirm:$false portion of the preceding command suppresses the "Are you sure you want to perform this action?" confirmation prompt that the Set-SmbShare cmdlet usually displays.

You can then use the Get-SmbShare cmdlet to verify that access-based enumeration has been enabled on the share:

PS C:\> Get-SmbShare -Name "Archive Share" | select FolderEnumerationMode | fl

FolderEnumerationMode : AccessBased

Creating advanced SMB shares

The procedure for creating an advanced SMB share using Server Manager is similar to creating a general-purpose share but includes the following additional steps:

  • You can use the options on the Management Properties page to specify the type of usage for the folder. You can select one or more of the following values:
    • User Files
    • Group Files
    • Application Files
    • Backup And Archival Files
    • You can also specify one or more email addresses for the folder owner or owners.
[Previous] [Contents] [Next]