Сценарий для удаления областей и суперобластей DHCP
@echo off
@if not «%OS%»==»Windows_NT» (set INFO=echo && set SEXIT=1) else (set INFO=rem && set SEXIT=0)

%INFO% *********************
%INFO% Script: dhcp_config.bat
%INFO% Creation Date: 16.07.2006
%INFO% Author: Nikolay Andrianov
%INFO% Email: slayer@amdclub.ru
%INFO% *********************
%INFO% Description: Скрипт удаления DHCP областей и суперобластей.
%INFO% *********************
@if «%sexit%»==»1» goto exit

set server_adress=10.10.1.3
set n_scope=0
set name=1
set IPTMP=10.10.25.
set fullscope=%IPTMP%%n_scope%
set count=1
set count_end=32

:dhcp1
netsh dhcp server %server_adress% delete superscope «RU-POS%name%»
netsh dhcp server %server_adress% delete scope %fullscope% dhcpfullforce

if %count% EQU %count_end% goto end1
set /A n_scope=%n_scope%+8
set /A name=%name%+1
set fullscope=%IPTMP%%n_scope%
set /A count=%count%+1
goto dhcp1

:end1
Exit