2012-07-03 35 views

回答

3

是的,你可以使用/m開關shutdown這樣

shutdown /s /m \\computer1 /t 0 
4

從正在以具有正確權限的用戶身份運行的批處理中調用shutdown命令或使用psshutdown

+0

關機-s -t 2是關閉我的電腦代碼。我想從我的電腦關閉另一臺電腦。 – Amith

+0

'/ m \\ ':指定目標計算機 –

+0

shutdown -s/m \\ amith-016 -t 2我使用此代碼但它不工作 – Amith

0

這應該工作,但你可以關閉你的無線網絡範圍內任何一臺電腦找到電腦按名稱的 + 暫停 + 打破所有在同一時間,然後去計算機名稱。

@Echo off 
cd\ 
Echo Saman=Program 
REM **************************** 
REM * Program Variables * 
REM **************************** 

set varcomputer=[computername] 
goto loop 
:[computername] 

Exit 

REM **************************** 
REM * Program * 
REM **************************** 

:loop 
echo Shutting down %varcomputer%. 
shutdown -s -m \\%varcomputer% -t 600 -c "The computer is shutting down. Please save your work." 
goto %varcomputer 
-1

最簡單的方法:

set computertoshutdown=COMPUTERNAME 
set timetoshutdown =TIMEtoSHUTDOWN 
set message=MESSAGE 

shutdown -s -m \\%computertoshutdown% -t %timetoshutdown% -c "%message%" 
相關問題