View Single Post
Old 04-16-2009, 01:00 PM   #1 (permalink)
SparkMonkeyHellion
 
Banned

Join Date: Feb 2009

Location: Guantanomo Bay, Cuba

Posts: 546

SparkMonkeyHellion is on a distinguished road

Default Batch Script Help Please

Okay, I'm up to no good again...

I want to make a script which pings all of our machines on the network and if a machine doesn't respond it echos that machine name into a txt file.

Here's what I've got so far:

1) Exported CSV of all current machines in AD
2) Created an Excel document which generates the script to ping each machine by name (brilliant I might add)

=""&A2&""&B2&""&C2&"" - here's the formula I used where A contains "ping " and B is the list from AD and C is " -n 1". The end result is that I have a single column with a pretty list of "ping %machinename% -n 1" with all of our machines populating the %machinename% spot.

So it pings everything once, which is enough to determine if it's online or not but now I need a convenient method of finding the machines that don't respond (the output for this script is messy).

Any one know how to do IF>THENS in batch scripts?
SparkMonkeyHellion is offline