If you had to maintain a SCCM server in an offline environment you know it’s not a simple task. One of the steps you have to carry out is to download all the updates from the Internet or to copy them from another WSUS/SCCM SUP server that is connected to Internet and had already downloaded all the updates.
For the first method you can use this great post:
and part 2:
If you have another WSUS/SCCM SUP server that is online, the easiest way to get those updates is to copy them from the server. This is where it gets a little bit tricky:
The updates are found in the “WSUSContent” folder or in SCCM’s case in a folder share of your choice, the only problem is that they are scattered in different folders, This causes a problem because when you’ll need to provide the offline WSUS/SCCM SUP with the updates they will have to be in a single folder. For this purpose I found a little batch file that will get the job done (Credit goes to Rems):
@echo off title WAIT ! Set "sourceDir=c:\1234" Set "destinationFolder=c:\SHOEBOX" Set "_report=c:\logxcopy.txt" IF NOT EXIST "%sourceDir%" (echo.Could not find %sourceDir% &GoTo:done) :: overwrite previous log >"%_report%" ( echo.%date% - %time% echo.--------------------------------------------------- echo. ) :: copy files For /F "Delims=" %%! in ('Dir "%sourceDir%\" /b /s /a-d 2^>nul') do ( @echo.%%! &( @xcopy "%%!" "%destinationFolder%\" /i /y /h /f /c >>"%_report%",2>&1) ) :done title,Done....... echo.&pause>nul
This batch will copy all the files from a folder tree to a single folder.
More info about offline WSUS/SCCM SUP environment: