Disconnect a user or users

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To disconnect a user or users

  • Using Shared Folders

  • Using a command line

Using Shared Folders

  1. Open Computer Management.

  2. In the console tree, click Sessions.

    Where?

    • Computer Management/System Tools/Shared Folders/Sessions
  3. Do one of the following:

    • To disconnect all users, on the Action menu, click Disconnect All Sessions.

    • To disconnect one user, in the details pane, right-click the user name, and then click Close Session.

    • To disconnect multiple users, press the CTRL key while clicking the user names, right-click any user name, and then click Close Session.

Notes

  • To open Computer Management, click Start, click Control Panel, double-click Administrative Tools, and then double-click Computer Management.

  • When you administer another computer remotely, your connection appears as an open named pipe. It cannot be closed.

Using a command line

  1. Open Command Prompt.

  2. Type:

    net session*\\computername***/delete**

Value Description

net session

Lists or disconnects inbound sessions on the local computer.

\\computername

Identifies the computer for which you want to list or disconnect sessions.

/delete

Ends sessions that are originated by \\computername, and closes all open files that are opened from \\computername. If \\computername is omitted, all inbound sessions and associated files are closed.

Notes

  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.

  • To view the complete syntax for this command, at the command prompt, type:

    net help session

Caution

  • If you disconnect users who are accessing shared resources, they might lose data. You may want to warn connected users before you disconnect them.

Notes

  • You must be logged on as a member of the Administrators group, Server Operators group, or Power Users group to complete this procedure. If your computer is connected to a network, network policy settings might also prevent you from completing this procedure.

  • For information about how to connect to another computer, see Related Topics.

  • File sharing options may be limited if simple file sharing is enabled. For more information about simple file sharing, see article Q304040, "Description of File Sharing and Permissions in Windows XP," in the Microsoft Knowledge Base.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Concepts

Shared Folders overview Microsoft Management Console Connect to another computer

Other Resources

Net session Send a console message to all connected computers Send a console message to a computer that you are managing