For /f %%a in (hostnames.txt) do set host=%%a& call :DOSTUFF

Might be a starting point as well, if you're batch-comfortable


Sent from my Blackberry, which may be an antique but delivers email RELIABLY

-----Original Message-----
From: Steven Peck <[email protected]>
Date: Wed, 27 Feb 2013 10:49:34 
To: NT System Admin Issues<[email protected]>
Reply-To: "NT System Admin Issues" 
<[email protected]>Subject: Re: Ping by name tool

oh hey
http://www.myitforum.com/forums/m172057-print.aspx
4th reply.  Looks to be PowerShell v1 stuff but seems to have what you
asked about.

$Computer = "remotecomputer.domain.com"

if (($Ping = Get-WmiObject -Class Win32_PingStatus -Filter
"Address='$Computer'").StatusCode -eq 0) {
nbtstat -A $Ping.ProtocolAddress
} else { "no response to ping" }


add a $servers = get-content "list.txt" and then put the rest in a for loop.


On Wed, Feb 27, 2013 at 10:39 AM, Steven Peck <[email protected]> wrote:

> The BSonPosh module has a ton of stuff similar to this you could use as a
> starting point
>
> http://bsonposh.codeplex.com/
>
> Since it's a script module you can open them up and see how they work as
> well.
>
> On Wed, Feb 27, 2013 at 10:24 AM, David Lum <[email protected]> wrote:
>
>>  I’m looking for a ping tool that will ping a text file list of
>> hostnames and return the reply, IP address and the NetBIOS name. Here’s
>> what I currently have to do:****
>>
>> ** **
>>
>> Get list of machine names from AD, McAfee, or other systems. Ping the name
>> ****
>>
>> With the returned IP, do an NBTSTAT –A to check the NetBIOS name to see
>> if it matches the pinged host name****
>>
>> ** **
>>
>> I have to do this because frequently our VPN’d systems don’t have a
>> correct DNS entry, so some management software gets tripped up.****
>>
>> ** **
>>
>> I could do a search for free ping tools, but figured a query here might
>> save me time if someone has a tool they do that already meets this
>> requirement. Advanced IP scanner comes close, but only accepts IP’s and not
>> host names as what to ping.****
>>
>> ** **
>>
>> Ideally the output would be in a CSV format. I’m guessing PowerShell can
>> do this too?****
>>
>> *David Lum*
>> Sr. Systems Engineer // NWEATM
>> Office 503.548.5229 //* *Cell (voice/text) 503.267.9764****
>>
>> ** **
>>
>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>
>> ---
>> To manage subscriptions click here:
>> http://lyris.sunbelt-software.com/read/my_forums/
>> or send an email to [email protected]
>> with the body: unsubscribe ntsysadmin
>>
>
>

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to