Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As far as I know using the command:

netsh dhcp Server serverIP Scope  x.x.x.x delete reservedip reservationip macaddress[..]

Will delete a single reserved ip, is it also possibile to delete a whole range (through netsh)? I could not find a syntax which deals with this problem. The OS is Windows Server 2008.

Thank you in advance.

share|improve this question
up vote 2 down vote accepted

Don't bother using netsh to delete the reservation range; use a loop to delete them one by one.

for /L %x in (2,1,254) do echo netsh dhcp Server serverIP Scope  192.168.1.%x delete reservedip reservationip macaddress[..]

The /L is a literal and does need to be written in exactly. The %x can be replaced with %y if desired. You can even nest:

for /L %y in (0,1,255) do for /L %x in (2,254,1) do netsh dhcp Server serverIP Scope  192.168.%y.%x delete reservedip reservationip macaddress[..]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.