Recovering from ipconfig /release on a remote PC [closed]
Asked Answered
M

5

8

Not strictly a programming question, but I was programming at the time and couldn't find an answer, so I thought, "Hey, I'll give StackOverflow a try!"

So I'm connected to my Windows XP work PC over a Remote Desktop connection through VPN. In a command window (on the remote PC), I foolishly type ipconfig /release. A split second before I come to my senses, I hit Enter. D'oh!

So what now? Am I hosed until I get to the office Monday morning? Any way to remotely make my office PC get itself a new IP address?

Moschatel answered 2/11, 2008 at 1:2 Comment(1)
Why have your check script reboot, why not just have it ipconfig /renew?Overtime
A
4

If it makes you feel any better, most of us have done something similar. I can't offer a suggestion that doesn't involve human intervention, but I can offer two ways to prevent a "next time" for you:

  1. Look into a remote power controller. Cheap (inexpensive, hobbyist-grade) options are available through www.x10.com; other vendors (Pulizzi, DataProbe, etc.) provide more reliable solutions for a higher price. You may even be able to find a UPS that allows you to control it via a serial port.

    Plug your PC into the power controller, and find a second PC to control it. Now you can reboot your PC remotely, no matter how badly you de-configure it.

  2. Anticipate and compensate. It's reasonable to expect that you may need to release/renew the IP address again, so write a utility that will check for the loss of IP address and reboot if that occurs. For example, ping your default gateway and reboot if the ping fails consistently. Just be sure to anticipate the consequences of an unexpected reboot!

Anabolism answered 2/11, 2008 at 1:55 Comment(0)
C
2

Try giving a call to the office and get someone(if any) to restart your computer or ipconfig /renew

Cagle answered 2/11, 2008 at 1:11 Comment(1)
Networking at the 8th layer usually works best :)Lewert
P
2

What you need to do, is find some way to cut the power to your PC. Many PCs are configured by default to reboot if there is a power failure. So, just hack into your power grid, and shut off power to the entire building. Once your computer reboots, along with all the other equipment, your computer should have it's IP back.

Prosenchyma answered 2/11, 2008 at 1:25 Comment(0)
C
2

(This probably won't work)

I think if you get your network connection severed, it'll reset (like, if I run ipconfig /release, then shut off my router and restart it, I get a new IP).

It'd be well winging it, but if I was desperate I'd hook up to my DHCP server and reboot it.. I predict the end result would be me still not being able to connect, and the admins giving me a good whipping.

Christychristye answered 2/11, 2008 at 1:41 Comment(2)
That wouldn't work, as your DHCP server isn't what controls network state. You'd have to power cycle the switch the PC is on to get it to drop link. But, +1 for innovative thinking.Mephistopheles
Hence the disclaimer. :)Christychristye
C
2

Log into the managed switch the PC is connected to, shutdown the port, wait a few seconds, and then bring it back up. If you don't have a managed switch or no access to it, wait until Monday.

Claudie answered 2/11, 2008 at 2:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.