Batch – Migrate User profile to share drive

@echo off
net use B: /delete /Y
cmdkey.exe /add:*.domain.local /user:DOMAIN\Your_User /pass:Your_Pass
net use B: “\\Your_Server\users$”
cd /d b:
mkdir “%username%-%date:/=.% %time::=-%”
xcopy “C:\users\%username%\Desktop” “b:\%username%\Desktop” /D /E /V /C /I /F /H /R /K /Y
xcopy “C:\users\%username%\Documents” “b:\%username%\Documents” /D /E /V /C /I /F /H /R /K /Y
xcopy “C:\users\%username%\Downloads” “b:\%username%\Downloads” /D /E /V /C /I /F /H /R /K /Y
xcopy “C:\Users\%username%\AppData\Local\Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe” “b:\%username%\Sticky” /D /E /V /C /I /F /H /R /K /Y
xcopy “C:\Users\%Username%\AppData\Local\Google\Chrome\User Data\Default” “b:\%username%\Chrome” /D /E /V /C /I /F /H /R /K /Y
net use B: /delete /Y
del C:\users\%username%\Desktop\123.bat