Выбрать главу

NOTE Computer Management, net share, and get-smbshare display information about SMB-based shares, including standard SMB folder shares, hidden SMB folder shares (those ending with the $ suffix), and SMB folders shared by using Distributed File System (DFS). Server Manager displays information about standard SMB folder shares, SMB folders shared by using DFS, and folders shared by using Network File System (NFS). Server Manager does not display information about hidden SMB folder shares.

In Computer Management, you can view the shared folders on a local or remote computer by following these steps:

1. You’re connected to the local computer by default. If you want to connect to a remote computer, press and hold or right-click the Computer Management node and then tap or click Connect To Another Computer. Choose Another Computer, type the name or IP address of the computer you want to connect to, and then tap or click OK.

2. In the console tree, expand System Tools, expand Shared Folders, and then select Shares. The current shares on the system are displayed, as shown in Figure 3–2.

FIGURE 3–2 Available shares are listed in the Shared Folders node.

3. The columns for the Shares node provide the following information:

■ Share Name Name of the shared folder.

■ Folder Path Complete path to the folder on the local system.

■ Type What kind of computers can use the share. This typically shows as Windows because SMB shares are for Windows-based computers.

■ # Client Connections Number of clients currently accessing the share.

■ Description Description of the share.

In Server Manager, you can view the shared folders on a local or remote computer by following these steps:

1. Select the File And Storage Services node, and then select the related Shares subnode.

2. As Figure 3–3 shows, the Shares subnode provides information about shares on each file server that has been added for management. The columns for the Shares subnode provide the following information:

■ Share Name of the shared folder.

■ Local Path Complete path to the folder on the local system.

■ Protocol What protocol the share uses, either SMB or NFS.

■ Cluster Role If the server sharing the folder is part of a cluster, the cluster role is shown here. Otherwise, the cluster role is listed as None.

FIGURE 3–3 Tap or click Shares in the main pane (on the left) to view the available shares.

3. When you tap or click a share in the Shares pane, information about the related volume is displayed in the Volume pane.

REAL WORLD NFS is the file sharing protocol used by UNIX-based systems, which includes computers running Apple OS X. As discussed in “Configuring NFS sharing” later in this chapter, you can enable support for NFS by installing the Server For NFS role service as part of the file server configuration.

Creating shared folders in Computer Management

Windows Server 2012 R2 provides several ways to share folders. You can share local folders by using File Explorer, and you can share local and remote folders by using Computer Management or Server Manager.

When you create a share with Computer Management, you can configure its share permissions and offline settings. When you create a share with Server Manager, you can provision all aspects of sharing, including NTFS permissions, encrypted data access, offline settings for caching, and share permissions. Typically, you create shares on NTFS volumes because NTFS offers the most robust solution.

In Computer Management, you share a folder by following these steps:

1. If necessary, connect to a remote computer. In the console tree, expand System Tools, expand Shared Folders, and then select Shares. The current shares on the system are displayed.

2. Press and hold or right-click Shares, and then tap or click New Share. This starts the Create A Shared Folder Wizard. Tap or click Next.

3. In the Folder Path text box, enter the local file path to the folder you want to share. The file path must be exact, such as C: \EntData\Documents . If you don’t know the full path, tap or click Browse, use the Browse For Folder dialog box to find the folder you want to share, and then tap or click OK. Tap or click Next.

TIP If the file path you specified doesn’t exist, the wizard can create it for you. Tap or click Yes when prompted to create the necessary folder or folders.

4. In the Share Name text box, enter a name for the share, as shown in Figure 3–4. This is the name of the folder to which users will connect. Share names must be unique for each system.

FIGURE 3–4 Use the Create A Shared Folder Wizard to configure the essential share properties, including name, description, and offline resource usage.

TIP If you want to hide a share from users (which means that they won’t be able to view the shared resource when they try to browse to it in File explorer or at the command line), enter a dollar sign ($) as the last character of the shared resource name. For example, you could create a share called PrivengData$, which would be hidden from File explorer, NeT VIeW, and other similar utilities. Users can still connect to the share and access its data if they’ve been granted access permission and they know the share’s name. Note that the $ must be typed as part of the share name when mapping to the shared resource.

5. If you want to, enter a description of the share in the Description text box. When you view shares on a particular computer, the description is displayed in Computer Management.

6. By default, the share is configured so that only files and programs that users specify are available for offline use. Typically, this is the option you want to use because this option also enables users to take advantage of the new Always Offline feature. If you want to use different offline file settings, tap or click Change, select the appropriate options in the Offline Settings dialog box, and then tap or click OK. The offline availability settings available include the following:

■ Only The Files And Programs That Users Specify Are Available Offline Select this option if you want client computers to cache only the files and programs that users specify for offline use. Optionally, if the BranchCache For Network Files role service is installed on the file server, select Enable BranchCache to enable computers in a branch office to cache files that are downloaded from the shared folder, and then securely share the files to other computers in the branch office.

■ No Files Or Programs From The Shared Folder Are Available Offline Select this option if you don’t want cached copies of the files and programs in the share to be available on client computers for offline use.

■ All Files And Programs That Users Open From The Shared Folder Are Automatically Available Offline Select this option if you want client computers to automatically cache all files and programs that users open from the share. Optionally, select Optimize For Performance to run cached program files from the local cache instead of the shared folder on the server.