Search

  毎日にもっと楽~を! BLOG Tokyo

2005年11月24日

shutdown コマンド

ラボの中にある遠くのマシンの電源を消しにわざわざ行くのが面倒くさいなぁと思って、遠隔シャットダウンの可能性を調べていたらXPならば簡単にできることがわかった。恐ろしいほど簡単にできてしまう。telnetのポートを使っているのか知らないが、やっぱ個別にファイヤーウォールを設定しておかないとセキュリティ的に問題だよなぁ。管理者としては便利なんだけどね。


ABOUT SHUTDOWN

Enables a user to shutdown a Windows XP computer from the command line as well as perform additional features that are not available through Windows.

SYNTAX

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]
No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u] [p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)

EXAMPLES

shutdown -r -c "Rebooting for latest updates."

This would display a Windows System Shutdown window for 30 seconds warning the user that the computer is going to shutdown and then restart the computer.

リモートシャットダウンの例

shutdown -s -m \\computerA -t 30 -c "30秒後にシャットダウンします。"

-s →シャットダウン
-m →マシンの名前 \\の後にマシンの名前を書く
-t →秒
-c →コメント



Bookmark and Share


編集長のおすすめの一冊!2010

comments

comment form

(BLOG Tokyo にはじめてコメントされる場合、不適切なコメントを防止するため、掲載前に管理者が内容を確認しています。適切なコメントと判断した場合コメントは直ちに表示されますので、再度コメントを投稿する必要はありません。)

comment form