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.
-
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.
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 |
---|---|
|
Creates, deletes, or displays shared folders. |
|
The network name of the shared folder. |
|
Stops sharing the folder. |
Note | |
To view the complete syntax for this command, at the command
prompt, type: |