Batch file for termination (Update)

Want a batch file that will terminate a user based on there username. Here it is.

:start
echo off
title termination.bat
cls
echo This batch file will terminate employees based on username.  This script will   do all of the following:
echo 1) Disable AD account (any active sessions will NOT be terminated)
echo 2) Remove all groups containing with "d_ vpn ctx citrix"
echo 3) Delete their IP telephone number
echo 4) Hides email from GAL
echo 5) Move AD account into the Terminated Employees OU
echo 6) Move there H: Drive to \\SERVER\homedirs$\!terminatedEmployeesHDrive\
pause
set /p tempusername=What username would you like to terminate?
cls
@echo Terminate %tempusername%?
dsquery.exe user OU=Employees,DC=ABCCompany,DC=com -o dn -scope subtree -samid %tempUsername% -d SSC | findstr /r "CN="
if %errorlevel%==1 goto UserNoExist
@echo --------------------------------------------------------------------------------
@echo Is this correct?
pause
cls
echo Terminating %tempusername%
@echo--------------------------------------------------------------------------------
::Disable AD account
net user %tempusername% /active:no /DOMAIN
for /f "tokens=*" %%a in ('"dsquery.exe user OU=Employees,DC=ABCCompany,DC=com -o dn -scope subtree -samid %tempusername% -d SSC"') do set dnName=%%a
::Remove all groups containing with "d_ vpn ctx xitrix"
for /f "tokens=*" %%b in ('dsget user %dnName% -memberof ^| findstr /i /r "d_ vpn ctx citrix"') do dsmod group %%b -rmmbr %dnName%
::Set ipTel variable
for /f "skip=1 delims=dsget" %%a in ('dsget user %dnName% -iptel ^| find "  "') do set ipTel=%%a
:CheckIPPhone
echo %ipTel%|findstr /r "[0-9]"
if %errorlevel%==1 goto :HasNoIPPhone
set IPPhoneMessage=The IP phone number associated with %tempusername% is %ipTel:~2,4%. It is documented at G:\IS\PhoneNumbers\PhoneNumbers.csv
for /f "tokens=* skip=1" %%b in ('DSGET user %dnName% -fn ^| find "  "') do set firstName=%%b
for /f "tokens=* skip=1" %%b in ('DSGET user %dnName% -ln ^| find "  "') do set lastName=%%b
for /f "tokens=* skip=1" %%b in ('DSGET user %dnName% -title ^| find "  "') do set title=%%b
if %ipTel:~3,1%==5 (set location=Plant1
	goto IPPhoneDocument
	)
if %ipTel:~3,1%==7 (set location=Plant1
	goto IPPhoneDocument
	)
if %ipTel:~3,1%==6 (set location=Plant2
	goto IPPhoneDocument
	)
set location=Unknown
:IPPhoneDocument
echo `%ipTel:~2,4%,%firstName%%lastName%,%title%,%location%>>G:\IT\PhoneNumbers\PhoneNumbers.csv
goto IPPhoneCheckEnd
:HasNoIPPhone
set IPPhoneMessage=The user %tempusername% has no IP Phone.
:IPPhoneCheckEnd
::Delete ipTel from AD
dsmod user %dnName% -c -iptel ""
::Hide user from GAL
for /f "tokens=*" %%h in ('ldifde -f %temp%\hideExch.ldf -d "ou=Employees,dc=ABCCompany,dc=com" -p subtree -r "(&(objectCategory=person)(objectClass=User)(sAMAccountName=%tempusername%))" -l "DN" -v ^| find "entry"') do set ldifdeDNNAME=%%h
echo dn: %ldifdeDNNAME:~17%>%TEMP%\hideExch.ldf
echo changetype: modify>>%TEMP%\hideExch.ldf
echo replace: msExchHideFromAddressLists>>%TEMP%\hideExch.ldf
echo msExchHideFromAddressLists: TRUE>>%TEMP%\hideExch.ldf
echo ->>%TEMP%\hideExch.ldf
echo delete: showInAddressBook>>%TEMP%\hideExch.ldf
echo ->>%TEMP%\hideExch.ldf
ldifde -i -f %TEMP%\hideExch.ldf
::Delete ldf after import
del %TEMP%\hideExch.ldf
::Move user to Terminated Employees OU
dsmove %dnName% -newparent "OU=Terminated Employees,OU=Employees,DC=ABCCompany,DC=com"
::Check home directory, move to !terminatedEmployeesHDrive folder
if exist "\\server1\homedirs$\%tempusername%" goto server1
if exist "\\server2\d$\homedir\%tempusername%" goto server2
if exist "\\server3\d$\HomeDir\%tempusername%" goto server3
set homedirMessage=%tempusername% did not have an H: Drive
goto end
:server1
move /y "\\server1\homedirs$\%tempusername%" "\\server1\homedirs$\!terminatedEmployeesHDrive\"
set homedirMessage=%tempusername% H: Drive was located on server1. Verify that the folder has been moved  to the !terminatedEmployeesHDrive folder.
goto end
:server2
move /y "\\server2\d$\homedir\%tempusername%" "\\server2\d$\homedir\!terminatedEmployeesHDrive\"
set homedirMessage=%tempusername% H: Drive was located on server2. Verify that the folder has been moved  to the !terminatedEmployeesHDrive folder.
goto end
:server3
move /y "\\server3\d$\HomeDir\%tempusername%" "\\server3\d$\HomeDir\!terminatedEmployeesHDrive\"
set homedirMessage=%tempusername% H: Drive was located on server3. Verify that the folder has been moved  to the !terminatedEmployeesHDrive folder.
goto end
:end
echo --------------------------------------------------------------------------------
echo Please verify that all of the outputs above were successful.
echo --------------------------------------------------------------------------------
echo %homedirMessage%
echo.
echo %IPPhoneMessage%
echo.
echo List of additonal steps.
echo 1) Step one
echo 2) Step two
echo 3) Step three
echo.
echo --------------------------------------------------------------------------------
pause
exit
:UserNoExist
cls
echo The user you have specified does not exist in AD.
pause
goto start

This was really tough to create I hope others can use it and manipulate it as needed. Have FUN.