Information About Active Sessions on the Computer That Is Running the Server Service
Examples
To display a list of session information for the local server, type:
net session
To display session information for a client with the computer name Shepherd, type:
net session \\shepherd
To end all sessions between the server and the clients connected to it, type:
net session /delete
net session
Count the number of open sessions to see if the session limit of 10, or 5 in the case of Windows XP Home Edition / Professional, is already reached. Typically there is only one session per remote client.The information appears in a format similar to the following:
Computer User name Client type Opens Idle time ------------------------------------------------------------------------ \\BASSETT CHRISDR Windows 2000 1 00:00:13\\SHARONCA Administrator DOS LM 2.1 0 01:05:13
If there is more than one session from a remote client, view the User name context on the remote client that has set up more than one session:
- View all the services that are running, and find out if one is running under the user context of the username shown in the session table.
- Look for scheduled tasks that are running in a logon script and are using a different user account then the one logging in.
- Look for rows where the User name column is empty and examine the idle time.
Temporary null sessions are usually caused by IPC$ connections as the first step in establishing a connection. They stay active for 30 seconds to 90 seconds.
Note To disconnect client computer sessions, use the following command:
net session /delete \\computername
This command disconnects all sessions from that computer and closes all open files. This command may cause data loss if open files that have not been saved are closed.To set how long a session can remain idle before being automatically disconnected, set the autodisconnect feature by using net config server /autodisconnect. For more information about net config server, see Related Topics. An automatic disconnection is transparent to the user because the session is automatically reconnected when the user accesses the resource again.