You can disconnect users from a shared folder by using the Shared Folders MMC snap-in or by using the command prompt. You cannot disconnect users through Windows Explorer.
Important | |
Users may lose data if disconnected without warning. When possible, notify users before disconnecting them. |
Disconnect a user or users
To disconnect a user or all users from a shared folder or drive 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, click Shared Folders, and then click Sessions.
To disconnect all users, on the Action menu, click Disconnect all users. To disconnect a specific user, in the Details pane right-click the user name, and then click Close Session.
To disconnect a user or all users from a shared folder or drive 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 session \\<computer> /delete
For example, to disconnect a user on a computer named user_computer, which is connected to a shared folder that you are managing, type:
net session \\user_computer /delete
Value | Description |
---|---|
|
Lists or disconnects users connected to shared folders on the computer. |
|
The name of the computer accessing the shared folder. |
|
Ends the session, and closes all open files on the computer for the session. If you omit \\computer, the command ends the sessions on the local computer. |
Note | |
To view the complete syntax for this command, at the command prompt, type: |