Pages

Thursday, September 1, 2011

Clear Deleted Item folder from Exchange mailbox with out opening.

 

I could find a script to do this job, this script is utilizing OWA and clearing the Deleted Items folder. For executing this script you may need a account which has rights on all mailboxes from where you want to clear deleted items.

strURL = "http://”ExchangeServer'”/exchange/”E-Mail of the user”/deleted items"
Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "DELETE", strURL, False, strUName, strPwd
objXMLHTTP.setRequestHeader "Depth", "infinity,noroot"
objXMLHTTP.Send().