远程桌面关机重启

方法一:

在命令行(CMD)下输入命令

1.关机:

    shutdown -s -t 0

2.重启

 shutdown -r -t 0

方法二:

将下面的脚步保存为:xxx.bat 放在远程桌面机器桌面上。点击运行,输入 1为关机,2为重启

@echo off

:start

echo.&echo.

echo 确认要关闭或者重启计算机吗?

echo.&echo.

echo [ 1=关闭] [ 2=重启]

echo.&echo.

set/p choice=请输入命令:

if /i "%choice:~0,1%"=="1" (shutdown -s -t 0)

if /i "%choice:~0,1%"=="2" (shutdown -r -t 0)

猜你喜欢

转载自www.cnblogs.com/blueridge/p/10756208.html