Catching error message from ping

A

airwot4

I've been using ADSI to lookup a complete hostname from active
directory from a partial as part of a script.

It goes something like:

Retrieve partial hostname from excel spreadsheet - > authenticate this
to a full hostname from active directory - > ping the host to
determine if it is reachable - > if reachable perform a task.

The difficult is at the ping stage, some of the hostnames on active
directory do not seem to be able to resolve to I.P addresses. This
does not result in a ping succeeding or failing but merely an error,
how do I catch this error?

I am using My.Computer.Network.Ping to perform the ping operation.
 
R

rowe_newsgroups

I've been using ADSI to lookup a complete hostname from active
directory from a partial as part of a script.

It goes something like:

Retrieve partial hostname from excel spreadsheet - > authenticate this
to a full hostname from active directory - > ping the host to
determine if it is reachable - > if reachable perform a task.

The difficult is at the ping stage, some of the hostnames on active
directory do not seem to be able to resolve to I.P addresses. This
does not result in a ping succeeding or failing but merely an error,
how do I catch this error?

I am using My.Computer.Network.Ping to perform the ping operation.

Won't the standard try...catch block handle the exception?

Thanks,

Seth Rowe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top