If you need some additional help with Exchange or Office 365 we have many years experience supporting both Office 365 and other multi-tenant Exchange environments and can help on an ad-hoc basic. Feel free to call us on +44 (0) 330 1224 420, use our live chat or contact us using the button below
Hello everyone, today I will 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:
$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-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 user@domain.com -SearchDumpsterOnly -TargetMailbox "Discovery Search Mailbox" -TargetFolder RecoveredItems -LogLevel Full
IQ in IT is a cloud service provider based in Kingston Upon Thames. We offer a complete solution of cloud services including phones, virtual desktops and servers to our clients.