JSI Tip 10502. How can I prevent ADS (Automated Deployment Services) from using undocumented ports to deploy images on Windows Server 2003?

Jerold Schulman

May 21, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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

Where:

PortsStart is the port number for the start of the port range.PortsEnd   is the port number for the end of the port range, and must be a higher number than PortsStart

ADSportrange.bat contains:

@echo offsetlocalIf {%2}=={} goto err@echo %1|findStr "[^0-9]">nulif %ERRORLEVEL% NEQ 1 goto err@echo %2|findStr "[^0-9]">nulif %ERRORLEVEL% NEQ 1 goto errset /a PortsStart=%1set /a PortsEnd=%2if %PortsEnd% LEQ %PortsStart% goto errcall :quiet>nul 2>&1endlocalgoto :EOF:err@echo Syntax: ADSprtrange PortsStart PortsEndendlocalgoto :EOF:quietREG ADD "HKLMSYSTEMCurrentControlSetServicesADSImgSvcParameters" /V PortsStart /T REG_DWORD /F /D %PortsStart%REG ADD "HKLMSYSTEMCurrentControlSetServicesADSImgSvcParameters" /V PortsEnd /T REG_DWORD /F /D %PortsEnd%net stop ADSImgsvcnet start ADSImgsvc



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like