You can stop sharing a folder or drive by using the Shared Folders Microsoft Management Console (MMC) snap-in or by using a command prompt.
Important |
|
Users connected to a shared folder are disconnected when you stop sharing it. Users may lose data if you stop sharing a folder containing an open shared file without warning. When possible, notify users before you stop sharing a folder. |
Stop sharing a folder or drive
To stop sharing a folder by using the Windows interface
-
Open Computer Management. To do so, click Start, then right-click Computer, and then click Manage.
-
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
-
In the console tree, click System Tools, then click Shared Folders, and then click Shares.
-
In the details pane, right-click a shared folder, and then click Stop Sharing (this item only appears if you launched Computer Management using an account that is a member of the local Administrators group).
To stop sharing multiple files, press the CTRL key while clicking the file names, right-click any one of the selected files, and then click Stop Sharing. This removes shared network access to the selected files.
To stop sharing a folder by using a command line
-
To open an elevated Command Prompt window, click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
-
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
-
Type:
net share <sharename> /delete.
For example, to stop sharing a folder called myshare, type:
net share myshare /delete
|
Value
|
Description
|
|
Net share
|
Creates, deletes, or displays shared folders.
|
|
<sharename>
|
The network name of the shared folder.
|
|
/delete
|
Stops sharing the folder.
|
Note |
To view the complete syntax for this command, at the command prompt, type: net help share |