Windows Server 2003 in a Nutshell

net session

Manages 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 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

See Also

net file , net share , net use , net view , Shared Folders

Категории