Options

Need a simple ping script that pulls an IP address from the clipboard

rpenrirpenri Member Posts: 5 ■□□□□□□□□□
Hi, I was wondering if anyone knows how to do this. We frequently have to ping servers across the country, but each time it's a different server, so we would have to copy the IP address from the web interface, open up CMD, and then type "ping -t" and then paste the IP address.

We are upgrading/replacing servers and sometimes someone accidentally unplugs a cable or other and we need to test connectivity.

So, I think this is very inefficient and was wondering if someone could help me out.

I'm fairly new, so my knowledge of scripting is nil.

So, how would you go about doing this? I've tried making a CMD shortcut with command shortcuts (ping /k) but that only works if the IP address is the same. It would make it easier if it would pull the IP address from the clipboard when it runs.

If the IP address can't be pulled from the clipboard, that's fine, too. It could prompt you for the IP address and all you have to do is paste it in and press Enter. I would just love to see the code for it, since I have no idea how to even go about it.

Thanks

Comments

  • Options
    odysseyeliteodysseyelite Member Posts: 504 ■■■■■□□□□□
    you would need to use vbs script or powershell to do this.
    Currently reading: Start with Why: How Great Leaders Inspire Everyone to Take Action
  • Options
    rpenrirpenri Member Posts: 5 ■□□□□□□□□□
    Oh, okay. Well, I don't think they have Powershell installed on the workstations. But isn't VBscript a part of XP and should run, right?
  • Options
    odysseyeliteodysseyelite Member Posts: 504 ■■■■■□□□□□
    rpenri wrote: »
    Oh, okay. Well, I don't think they have Powershell installed on the workstations. But isn't VBscript a part of XP and should run, right?

    Yeah vbs will work.

    This link has the code which you should be able to modify to your liking. Google is your friend :) If you need a script most likely someone else has already done it. I rarely write code from scratch. I'm not that smart and I don't have that much time.

    VBScript - Ping multiple ip addresses and machine names - MSFN Forum
    Currently reading: Start with Why: How Great Leaders Inspire Everyone to Take Action
Sign In or Register to comment.