Name

net session

Synopsis

Manage sessions between a server and 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   User name    Client Type   Opens Idle time
-----------------------------------------------------
\\172.16.11.100  BACH$  Windows 2000    1   07:04:11
\\172.16.11.104  TEST$  Windows 2000    0   00:00:00
\\BACH   ADMINISTRATOR  Windows 2000    1   07:02:32
\\TEST   ADMINISTRATOR  Windows 2000    0   05:01:42
\\TEST   ADMINISTRATOR  Windows 2000    0   07:16:08
The command completed successfully.

View details of the session between client BACH and server TEST:

                     net session \\bach
User name       ADMINISTRATOR
Computer        BACH
Guest logon     No
Client type     Windows 2000 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 ...

Get Windows 2000 Administration in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.