If you do not know the usernames then you can send a message to all computers connected to the server using the msg * /SERVER:servername "message" command.
You can also use the /v switch to see the specific tasks that the msg command is performing.
Note: The msg command is intended to be used as a messaging system to terminal server users, not necessarily between two Windows 7 computers, for example.
This will send a message to all users that have a session on the server.
MSG {username | sessionname | sessionid | @filename | *}
[/SERVER:servername] [/TIME:seconds] [/V] [/W] [message]
username Identifies the specified username.
sessionname The name of the session.
sessionid The ID of the session.
@filename Identifies a file containing a list of usernames,
sessionnames, and sessionids to send the message to.
* Send message to all sessions on specified server.
/SERVER:servername server to contact (default is current).
/TIME:seconds Time delay to wait for receiver to acknowledge msg.
/V Display information about actions being performed.
/W Wait for response from user, useful with /V.
message Message to send. If none specified, prompts for it
or reads from stdin.`
You can also use Net session or net sess to run net session. Use net session to view the computer names and user names of users on a server, to see if users have files open, and to see how long each user's session has been idle.
Remarks: You can also use net sessions or net sess to run net session. Use net session to view the computer names and user names of users on a server, to see if users have files open, and to see how long each user's session has been idle.
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
To display one user's session, use ComputerName with the command. The information about a single user includes a list of shared resources to which the user has connections. A session is recorded when a user at a client successfully contacts a server. A successful session occurs when the two computers are on the same network, and the user has a user name and password that are accepted by the server.
A user at a client has to have a session with a server before he or she can use the resources of the server, and a session is not established until a user at a client connects to a resource. A client and a server have only one session, but they can have many entry points, or connections, to resources.
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. To end a session with the server, use net session \ComputerName /delete.