Restore MSSQL database using batch script


If you are looking for a tool which can restore the MS SQL DB backup from the production environment to the development environment, this script is just the one that you are after. In my example, the script does the following things: 1) Copy of the latest pro db backup to local. 2) Close all connections of … Continue reading Restore MSSQL database using batch script

WinSCP or Putty authenticates against Microsoft ISA/ TMG


Many companies use Microsoft ISA/ TMG as their enterprise proxy solution. This may work for most cases. But in some scenarios, it does not work well. For example, use WinSCP or Putty behind the proxy AND the proxy requires authentication. ISA/ TMG is mircrosoft technology, it uses NTLM based authentication which is not supported by … Continue reading WinSCP or Putty authenticates against Microsoft ISA/ TMG

Use batch script to add wireless user in HP MSM720 AP


I wrote a simple batch script to simplify the process of adding a new wireless user in the HP MSM720 AP for our network guy. It also includes a log file which keeps all the detailed information of what happened while executing the commands in the AP. @echo off cd /d %~dp0 set ADMIN=root set … Continue reading Use batch script to add wireless user in HP MSM720 AP

IIS Log Archive Script


@ECHO OFF set script_dir=C:\scripts\w3c set iislog_dir=C:\WINDOWS\system32\LogFiles\W3SVC1 set backup_dir=%Date:~-4,4%-%Date:~-10,2%-%Date:~-7,2%-%Time:~-11,2%'%Time:~-8,2%'%Time:~-5,2% set archive_dir=\\File_Server\Log_Archive\%COMPUTERNAME%\W3SVC1 C: cd %iislog_dir% REM ====Create a backup folder named after Today's date========================== mkdir %backup_dir% echo Subject: %COMPUTERNAME% W3C Log Archive Report > %script_dir%\log.txt echo.>> %script_dir%\log.txt date /t >> %script_dir%\log.txt echo. >> %script_dir%\log.txt REM ====Move logs that older than 30 days to the backup folder=================== echo … Continue reading IIS Log Archive Script

Auto Enable or Disable IE Proxy


It is painful to turn on/off the IE proxy manually in office/home. I wrote up a simple batch script to detect the location and automatically enable/disable the proxy when I login. @echo off REM Auto enable/disable IE proxy settings REM Define your proxy server here set proxy-server=my-proxy-server REM Enter the script path cd D:\scripts\batch REM … Continue reading Auto Enable or Disable IE Proxy