К основному контенту

Сообщения

Показаны сообщения с ярлыком "CMD"

Reboot/перезапуск сервера

CMD: Set WSHShell = WScript.CreateObject("WScript.Shell") WshShell.Run "C:\WINDOWS\system32\shutdown.exe -r -t 0"   Перезапустить простой скрипт VBS: Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true") for each OpSys in OpSysSet     OpSys.Reboot() next Перезапустить удаленный компьютер: Option Explicit Dim strComputer, strQuery ' Check command line arguments If WScript.Arguments.Named.Count > 0 Then Syntax Select Case WScript.Arguments.Unnamed.Count     Case 0         ' Default is local computer if none specified         strComputer = "."     Case 1         If InStr( WScript.Arguments.Unnamed(0), "?" ) > 0 Then             ' A "?" in the argument means display help     ...