今天用远程桌面需要关机。
还是贴个脚本更方便
- @echo OFF
- :input
- title Shut down
- set /p "num=1:Restart 2:Shut down 3:quit :"
- if "%num%"=="1" cls & goto 1
- if "%num%"=="2" cls & goto 2
- if "%num%"=="3" cls & goto 3
- echo. & echo There is no such option & pause>nul & cls & goto input
- :1
- echo Restart.
- echo =============================
- echo ====== Run command ==========
- shutdown /r /t 0
- echo ==============================
- pause>nul
- cls & goto input
- :2
- echo Shut down
- echo ===echo =============================
- echo ====== Run command ==========
- shutdown -p
- echo ==============================
- pause>nul
- cls & goto input
- :3
- echo -Quit.
- echo ===echo =============================
- echo ====== Run command ==========
- echo ==============================
- EXIT
- cls & goto input
复制代码
shutdown -p #立即关机
shutdown -s -t 200 #200秒后关机
shutdown -l #注销
shutdown -r #重启电脑
shutdown -h #睡眠
shutdown -a #取消关机任务
windows 重启网卡命令
- @echo off
- netsh interface set interface "本地" disabled
- timeout /t 5 >nul
- netsh interface set interface "本地" enabled
复制代码
|