4

How can I send a message to other users via CMD when I'm on Windows 2008 server?

I usually do shutdown -r -t 30, but how can I add a text to this command?

  • 1
    A key skill for a sysadmin is learning to read documentation. For something basic like this it should be the first place to look. Unsurprisingly the windows and 'Unix' documentation tell you how to do this. – user9517 Mar 14 '14 at 7:11
18
shutdown -r -t 30 -c "This system is shutting down in 30 seconds.."  

The -c "text" will add a comment to the display window notifying other users of the shutdown.

For Unix, the syntax would be shutdown -r -t 30 "This system is shutting down in 30 seconds.."

| improve this answer | |
  • thank you so much :9 is this also possible in unix? – tamani Mar 13 '14 at 13:06
  • Added syntax for unix – HostBits Mar 13 '14 at 13:38
  • 2
    Unixes vary. On OS X (and Linux) you want shutdown -r +5 "message", for a shutdown in 5 minutes. (No -t, which specfies the amount of time to let programs exit gracefully.) You can vary the time, but 1 minute is the minimum. A longer time may be better because it actually gives users a chance to react, or perhaps even contact the admin to abort the shudown. On Solaris you do: shutdown -y -g 30 -i 6 "message" for a 30 second shutdown. – Kevin Cathcart Mar 13 '14 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.