shutdown - Remote computer batch script with input prompt -
i trying write batch script shuts down remote computer , prompts computer name. i've tried copying bits , pieces of scripts have found far nothing work
this have far:
@echo off set /p computer =enter computer name: shutdown -m %computer% -r -t 60
this script should work. please note have removed space between computer
, =enter computer name
@echo off :inputcomputername set /p computer=enter computer name: if "%computer%"=="" goto error echo shutting down %computer% shutdown -s -m \\%computer% -t 600 -c "the computer shutting down. please save work." goto end :error echo did not enter computer name goto :inputcomputername :end