By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Catching error message from ping

P: n/a
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.

Jul 4 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jul 4, 7:51 am, airwot4 <neale...@gmail.comwrote:
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

Jul 4 '07 #2

P: n/a
Dump ping results into file and analyze file after ping completes.
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
On Jul 4, 7:51 am, airwot4 <neale...@gmail.comwrote:
>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

Jul 4 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.