That would look like this (replace the IP in this example 192.168.1.1 with machine you want to check):

@echo offrem Check to see if machine is on.echo 192.168.1.1ping -n 2 192.168.1.1 >NUL 2>NULif errorlevel 1 goto downrem ##########################rem Insert the code for doing work when the machine is on between this line and 'goto end" linegoto end:down rem The machine down echo It's not on:end

Featured Post

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.