My ultimate goal is to initiate the USMT command scanstate.exe on a list of PC's sumultaneously. Below is what I have working so far. It runs locally, creates a folder of my choosing and saves the .MIG file in that location. Does anyone have any input on how I can initiate scanstate simultaneously on a list of PC's? I would do SCCM, however due to cost, it's not an option. :-/
Here's a script I've pieced together from several sites:
@echo offcls
set CD=C:\Temp
set server=Server
set share=usmt\x86
set drive=U:
net use %drive% \\%server%\%share% /persistent:no
if "%errorlevel%"=="0" echo You should now be connected to the User State Migration Directory.
if "%errorlevel%"=="2" echo You are already connected to the User State Migration Directory. Please continue.
:Menu
echo.
echo
echo Please enter the directory name:
echo ________________________________
echo.
set /P folder=
SET MIG_IGNORE_PROFILE_MISSING=1
U:
scanstate U:\%folder% /i:migapp.xml /i:migdocs.xml
if "%errorlevel%"=="0" goto complete
if "%errorlevel%" NEQ "0" echo Error: %errorlevel%
if "%errorlevel%"=="1" echo Double check that the profile capture completed please..
if "%errorlevel%"=="2" echo Double check that the profile capture completed please..
if "%errorlevel%"=="27" goto dupe
:dupe
echo A folder with the same name already exists. Please choose another.
goto Menu
:complete
echo Profile Migration should be complete. Location: \\%server%\%share%\%folder%
pause
:exit