Skip to main content

Posts

Script to kill the SMTP service when the folders in mailroot reaches to a certain number

Hi All, Today I am going to give you a script . When the folders of SMTP service like pickup, badmail, Drop and queue becomes full or reaches to some number the below script will kill the SMTP process and will again start the process.  and a output log file will be created when the process is killed. Modify the below script as per you environment. @echo off set /a c=1 for /f %%i in ('dir C:\inetpub\mailroot\Pickup  ^| findstr /i /c:"file(s)"') do set count=%%i if %count% gtr 10 (      for /f "tokens=2 delims= " %%P IN ('tasklist /FO Table /M "SMTPSVC*" /NH ') DO (TASKKILL /F /PID %%P)     net start smtpsvc echo %date%      %time%       %count% - Pickup Folder has reached the limit >>"C:\smtp.log"      ) endlocal for /f %%i in ('dir C:\Inetpub\mailroot\Queue ^| findstr /i /c:"file(s)"') do set count=%%i echo count=%count% if %count% gtr 10   (      for /f ...

Script to restart SMTP Service after the Inetpub folder size increases to a certain number

Hi Guys, Today I am going to give you a script which can be set in the scheduled tasks and made to run every 1 Hrs or as per your wish. Once this script runs it will check the 4 folders in Mailroot and see if its reached the limit (10) which you have set in the script and restarts the SMTP service.     This will prevent the SMTP service hung and many problems which are associated with SMTP server. The script is given below Copy it in notepad and save it as .bat extension so that it becomes a batch script. @echo off setlocal set /a count=0 for /f %%i in ('dir E:\Inetpub\mailroot\Badmail  ^| findstr /i /c:"file(s)"') do set count=%%i echo count=%count% if %count% GTR 10 (         net stop smtpsvc & net start smtpsvc     ) endlocal for /f %%i in ('dir C:\Inetpub\mailroot\Drop  ^| findstr /i /c:"file(s)"') do set count=%%i echo count=%count% if %count% GTR 10 (         net stop smtpsvc...

Windows Update service unable to start, Error 0x8007277a

                    Windows Update service unable to start, Error 0x8007277a Hi, Welcome to my  forums. This could be an issue with third party winsock. You can reset winsock. Here's how you can do it. 1.Click the Windows Start button. 2. Type Cmd in the Start Search text box and press Ctrl-Shift-Enter (keyboard shortcut to run Command Prompt as Administrator). Click Continue to allow elevation request. 3. Type netsh winsock reset in the Command Prompt shell, and then press the Enter key. 4. Type netsh int ipv4 reset in the Command Prompt shell, and then press the Enter key. 5. If you use ipv6, type netsh int ipv6 reset in the Command Prompt shell, and then press the Enter key. Note: you may need to run Network Diagnostics afterwards to "repair" your connection after this.

Scripts to clean Unwanted files in C Drive

Guys today I am sharing a scripts to clean all the unwanted, Temp and waste files . I have added few scripts which are tested in cleaning the waste files so please do not fear to use it and I am using it in daily tasks. I have also included the Tree size View software with which you can find out which folder is taking more space if the scripts are unable to free up space. Please click the below Link and download the files... https://www.dropbox.com/s/dcw324tr2i71ezl/Temp%20Clean.zip?dl=0 Please let me know if anything else is required.

The Features your trying to use is on a network resource which is unavailable

Guys when you are  trying to install or Uninstall any software and your getting the below error which is preventing you from doing your work. Please follow the steps mentioned below and you can complete your task. When your stuck on this error message please follow the below steps. 1.  Press   + R  and put  regedit  in  Run  dialog box to open  Registry Editor  (if you’re not familiar with  Registry Editor , then click  here ). Click  OK. 2.  In the  Registry Editor  window, navigate to following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products 3.  Expand  Products  registry key and you’ll see some long randomly named sub-keys. For each of these sub-keys, in the corresponding right pane, you can use  ProductName  registry string ( REG_SZ ) to identify to which program this sub-key belongs. Following that, you’ve to find the correct sub-key ...

You receive a "The User Profile Service failed the logon” error message

When you log on to a Windows Servers by using a temporary profile, you receive the following error message: The User Profile Service failed the logon. User profile cannot be loaded. Occasionally, Windows might not read your user profile correctly, such as if your antivirus software is scanning your computer while you try to log on. Before you follow the methods here, try restarting your computer and logging on with your user account again to resolve the issue. If you restart your computer and it does not resolve this issue, use the following methods to resolve this issue. Fix the User Account Profile Please connect to the remote registry and follow the below steps to resolve the issue. This error occurs when the profile folder is deleted from C drive but still the entry is present in registry 1) Click Start, type regedit in the Search box, and then press ENTER. 2) In Registry Editor , locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft...

How To Resolve VSS Writer Errors Without Rebooting (VShadow)

Background This article describes how to resolve VSS Writer errors without rebooting Windows. Here are the scenarios in which you'd want to use these instructions: Scenario 1: Failed VSS Writers. There are instances when backups are failing due to an agent's VSS writers being in a failed state, but it is impossible or not desirable to restart the server until at least after business hours. Scenario 2: VSS Writers Not Started There may also be a writer that is not running and needs to be. Running the command  - " vssadmin list writers"  will only show a list of writers that are currently started Scenario 3: Using VShadow for Windows Server 2003 or XP VSS is available in the Volume Shadow Copy Service 7.2 SDK, which you can download from the Windows Download Center . Troubleshooting Troubleshooting Scenario 1: Failed VSS writers Find the failed VSS writers and their associated services, and restart them: 1) Run Command Prompt as Administrator (...