Recover Deleted Items From Outlook

By | February 5, 2008

Sometimes items get hard deleted and you need a way to recover them. This script will add a registry key to allow for message recovery for all folders in Outlook. Then you will be able to click on tools>"Recover Deleted Items" from any folder!

For More information on this please see: http://www.msexchange.org/tutorials/Recovering-Deleted-Items-Exchange-Server-2003-Part1.html

———-COPY EVERYTHING BELOW THIS LINE for the Script———-
' This code created the Reg Key for message recovery.
' Created 02.04.08 By Cheyenne "Chey" Harden

On Error Resume Next

Const HKLM = &H80000002

strComputer = "."
 
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Exchange\Client\Options"
strValueName = "DumpsterAlwaysOn"

oReg.GetDWORDValue HKLM,strKeyPath,strValueName,dwValue
If dwValue = 1 Then
 WScript.Quit
Else 
 dwValue = 1
 oReg.SetDWORDValue HKLM,strKeyPath,strValueName,dwValue
End If

———-COPY EVERYTHING ABOVE THIS LINE for the Script———-
 

PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!!

1. Make sure to be an admin on the target machines.
2. Successfully used in a logon script.

 
This information is provided "AS IS" with no warranties expressed or implied.

 

Leave a Reply

Your email address will not be published. Required fields are marked *