net session |
connected clients.
Syntax
net session [\\computername] [/delete]
Options
- None
Displays information about all sessions on the server.- \\computername
Specifies the client whose sessions with the server you want to
manage.- /delete
Terminates the session between the server and the specified client or
between the server and all clients if
computername is unspecified. Files that
were opened during the session are closed.
Examples
View current sessions on the server:
net session
Computer usernames Client Type Opens Idle time
-----------------------------------------------------
\\172.16.11.100 BACH$ W2K 1 07:04:11
\\172.16.11.104 TEST$ W2K 0 00:00:00
\\BACH ADMINISTRATOR W2K 1 07:02:32
\\TEST ADMINISTRATOR W2K 0 05:01:42
\\TEST ADMINISTRATOR W2K 0 07:16:08
The command completed successfully.
View details of the session between client BACH
and server TEST :
net session \\bach
usernames ADMINISTRATOR
Computer BACH
Guest logon No
Client type W2K 2195
Sess time 07:04:06
Idle time 07:02:40
Share name Type # Opens
-----------------------------------------------
pub Disk 1
The command completed successfully.
Terminate the session with BACH :
net session \\bach /delete
The session from BACH has open files.
Do you want to continue this operation? (Y/N) [N]: y
The command completed successfully.
Notes
- net sessions is equivalent to
net session. - A session is initiated when a client machine successfully contacts a
serverfor example, to access a shared folder or printer. - A client can establish only one session with a server but can have
many connections to resources on the server. - Use net send to warn clients to
save their work before terminating their connections with the server.
See Also
net file, net share,
net use, net view,
Shared Folders