Scenario
The administrator needs to create an image of each machine to be able to later roll back the system to the imaged state by deploying the image to the same machine.
Solution
The administrator creates a script that:
The images can be deployed to the corresponding target machines.
Sample script
setlocal
SET IMG_PATH=\\image_server\images
SET TMP_DRV_LETTER=h:
net use %TMP_DRV_LETTER% %IMG_PATH%
echo off
for /f "tokens=1-13 delims= " %%a in ('ipconfig /all') do (
IF %%a EQU Physical (
for /f "tokens=1-3 delims= " %%a in ('echo %%l') do (
echo IMAGE FILE: %%a.tib
asdcmd.exe /create /filename:%TMP_DRV_LETTER%\%%a.tib /harddisk:1 /compression:8
goto end
)
)
)
:end
echo on
net use %TMP_DRV_LETTER% /d
wpeutil Reboot
endlocal
What this script does:
Environment variables: