Select Sidearea

Populate the sidearea with useful widgets. It’s simple to add images, categories, latest post, social media icon links, tag clouds, and more.
[email protected]

Support: 0208 1668 716 | Sales: 0330 1224 420

Follow Us:

Recent Comments

    How to Recover Deleted Emails/Items using Windows PowerShell

    How to Recover Deleted Emails/Items using Windows PowerShell

    Today we will be talking about recovering deleted emails and item using PowerShell. Occasionally accidents happen and important emails or things like calendar events get deleted. If you are unlucky you won’t be able to recover the deleted items the easy way over Microsoft Exchange server and will have to use PowerShell. Below are the steps to take to do this


    Make Sure you are a member of the Discover Management Role Group.

    Before you can recover the deleted item, you need to be a member of the Discover Management Role Group (DMRG). This will allow you to search for messages across multiple mailboxes in your organization. If you are not a member of the DMRG then follow this link that will show you steps to assign yourself that role: Link


    Startup PowerShell and put in your credentials, where you’re getting the sessions from and importing.

    The next thing to do is start up PowerShell. Type in the code below: $cred = Get-Credential This get the credentials for the exchange server:

    .$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic –AllowRedirection

    This sets up a connections with the exchange server:

    Import-PSSession $session

    This will import the sessions.


    Search for and recover the email.

    Now that PowerShell is setup we can move onto recovering the deleted item. Note: items in square brackets [example] are to be replaced by your requirements.To retrieve a single item follow these steps: First you need to search for the email:

    search-Mailbox [user] -SearchDumpsterOnly -SearchQuery [search query] -TargetMailbox "Discovery Search Mailbox" -TargetFolder [search name] -LogLevel Full

    Once you’ve found the item you can recover it:

    Search-Mailbox "Discovery Search Mailbox" -SearchQuery [search query] -TargetMailbox [user] -TargetFolder inbox

    If you wish to recover all permantely deleted items from the purged items folder run this line of code:

    Search-Mailbox [email protected] -SearchDumpsterOnly -TargetMailbox "Discovery Search Mailbox" -TargetFolder RecoveredItems -LogLevel Full 

    We hope this blog post has helped you. Thank you for reading!

    Got any more questions? Don’t hesitate to contact us via our email or call us on 0330 1224 420 

    Questions: [email protected] 

    Here's our live calendar!

    Continue reading: 

    How to recover an Office 365 Mailbox using Windows Powershell

    Transfer to another users mailbox on Office 365 & Exchange Server using PowerShell

    How to Add/Remove Calendar & Contacts permission’s for Office 365 User’s via PowerShell

    [hubspot portal=”25047923″ id=”fbd0c3f3-487c-4414-affa-dee147818244″ type=”form”]