@echo off
@rem **********************************************************************************
@rem OS Deployment Script to restart the Logon service in the Target machine
@rem !!!!Caution: Don't edit without proper permission
@rem **********************************************************************************

@rem **********************************************************************************
@rem Get permission from the user to run such commands
@rem **********************************************************************************
echo.
@echo *********************************************************************************
@echo           List Of Commands that are going to be executed sequencially
echo.  
@echo                    1.  ipconfig /flushdns
@echo                    2.  ipconfig /registerdns 
@echo                    3.  net stop netlogon 
@echo                    4.  net start netlogon
@echo *********************************************************************************
echo. 
set /p USER_CHOICE=" ... Do you want to proceed ? Yes / No ....    "

@if /I "%USER_CHOICE%" == "Yes" goto CommandExecution
@if /I "%USER_CHOICE%" == "Y" goto CommandExecution

goto End

:CommandExecution
ipconfig /flushdns
ipconfig /registerdns 
net stop netlogon 
net start netlogon.

:End
	echo.
	pause
	@exit /b 1

:Eof