無需安裝第三方軟體,Windows 內建的 shutdown.exe 與 at 命令即可輕鬆實現定時關機、倒數關機、取消關機甚至遠端關機。以下為完整參數表與實用範例。
C:\Windows\System32\shutdown.exe(Windows 2000 可手動複製此檔使用)
| 需求 | 指令 | 說明 |
|---|---|---|
| 指定時間關機(如 22:00) | at 22:00 shutdown -s | 使用 AT 排程,到時彈出 30 秒倒數對話框 |
| 倒數關機(如 60 分鐘後) | shutdown -s -t 3600 | -t 後接秒數,3600 秒 = 60 分鐘 |
| 取消已排程關機 | shutdown -a | 中止目前排程的關機動作 |
| 圖形化設定介面 | shutdown -i | 開啟「關機對話框」可視化設定 |
| 強制關閉應用程式並關機 | shutdown -s -f | -f 強制終止執行中程式 |
| 關機並重新開機 | shutdown -r -t 60 | -r 重新開機,60 秒後執行 |
| 遠端關機 | shutdown -s -m \\ComputerName | 需具備遠端電腦管理權限 |
| 自訂關機提示訊息 | shutdown -s -t 300 -c "系統將於 5 分鐘後關機,請儲存檔案" | -c 後接雙引號訊息 |
善用這些指令,即可靈活掌握電腦開關機排程,無論是定時下班關機、遠端管理伺服器,或是撰寫批次檔自動化維護,都能得心應手。