ADS on Windows Server 2003 may use undocumented ports to deploy images, which can result in it using ports that are restricted by your firewall or router.

I have scripted ADSportrange.bat to configure a port range that ADS can use to deploy images.

The syntax for using ADSportrange.bat is:

\[Call\] ADSportrange PortsStart PortsEnd


<b>PortsStart</b> is the port number for the start of the port range.

<b>PortsEnd</b>   is the port number for the end of the port range, and must be a higher number than <b>PortsStart</b>
ADSportrange.bat contains:
@echo off
If \{%2\}==\{\} goto err
@echo %1|findStr "\[^0-9\]">nul
if %ERRORLEVEL% NEQ 1 goto err
@echo %2|findStr "\[^0-9\]">nul
if %ERRORLEVEL% NEQ 1 goto err
set /a PortsStart=%1
set /a PortsEnd=%2
if %PortsEnd% LEQ %PortsStart% goto err
call :quiet>nul 2>&1
goto :EOF
@echo Syntax: ADSprtrange PortsStart PortsEnd
goto :EOF
<font size="1">REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\ADSImgSvc\Parameters" /V PortsStart /T REG_DWORD /F /D %PortsStart%
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\ADSImgSvc\Parameters" /V PortsEnd /T REG_DWORD /F /D %PortsEnd%</font>
net stop ADSImgsvc
net start ADSImgsvc