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 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -