New-ComplianceSearch BUG – ExchangeLocation gets cleared.

Just creating some script for GDPR email removal mechanism, and noticed one interesting thing – already reported this bug to MS.

Last time when I got issue about Compliance Searches it was that when telling it to “purge” the messages it was not really purging the messages – I flagged that you need to use Search-Maibox to actually do it – case was submitted to MS and they changed the documentation.

There is something more – when creating a compliance search and assigning it to the case I noticed that when triggering a command the ExchangeLocation was…empty. It wouldn’t be weird but I explicitly told  I want to have “all” there.

Continue reading “New-ComplianceSearch BUG – ExchangeLocation gets cleared.”

Get-InboxRule and “You may need elevated permissions. isn’t within your current write scopes. Can’t perform save operation.”

Reminder – for myself as well.

When granting permissions for the role group to get the inbox rules (Get-InboxRule), do not copy role from “View-Only Recipients” or anything else that has:

Get-ManagementRole “” | fl

ImplicitRecipientWriteScope : None

Otherwise, even you if you’ve left the Role Group in the default scope you will get an error.

“Mailbox size exceeds target quota 2.3 GB” when moving the mailbox between databases / servers.

When receiving such error please check you quota on mailboxdatabase:

[PS] D:\Exchange Server\V15\Bin>Get-MailboxDatabase | fl

RunspaceId : 5aa6941c-eadf-4c8e-b9fb-8163b7426622
JournalRecipient :
MailboxRetention : 30.00:00:00
OfflineAddressBook :
OriginalDatabase :
PublicFolderDatabase :
ProhibitSendReceiveQuota : <strong>2.3 GB</strong> (2,469,396,480 bytes)
ProhibitSendQuota : 2 GB (2,147,483,648 bytes)
RecoverableItemsQuota : 30 GB (32,212,254,720 bytes)
RecoverableItemsWarningQuota : 20 GB (21,474,836,480 bytes)

Set it up ou to your needs, in my case this database will be hosted only to export mailboxes to PST files:

 Get-MailboxDatabase WROMR0-DB001 | Set-MailboxDatabase -ProhibitSendReceiveQuota 120GB -ProhibitSendQuota 120GB 

Folder named “Files” disappears after mailbox is moved to O365 Exchange Online.

Lets say a user had (pleas note the past simple time ^^) a folder named “Files” in the mailbox on the top level, you have moved the mailbox to O365 Exchange Online…

FilesFolder

Continue reading “Folder named “Files” disappears after mailbox is moved to O365 Exchange Online.”

Completely remove whole meetings’ SERIES using PowerShell and EWS.

Hey!

Some time ago I’ve published here a way to remove meetings from calendars using EWS:

https://paweljarosz.wordpress.com/2017/10/09/exchange-online-remove-cancelled-outlook-meetings-using-powershell-and-ews/

I got a bit upset that I needed to run the script from time to time to remove old stalled  cancelled meetings that were there before applying “AutoAccept” calendar processing. We got tons of them believe me, and I wanted to get rid of them completely! But how to remove the whole series and not just meetings for like two years, I wanted not to worry about the meetings even after 5 years, I just didn’t know how to remove the whole series as when people were mentioning about removing the series in the Internet articles, they were usually mentioning how to remove meetings for a long period of time and were calling it by removing a “series”.

Continue reading “Completely remove whole meetings’ SERIES using PowerShell and EWS.”

How to remove litigation hold from mailbox in Exchange Online and clean Purges folder immediately.

When removing litigation hold from mailbox in Exchange Online you need to run these 2 commands in order to start mailbox clean immediately:

Set-Mailbox -Identity "identity" -LitigationHoldEnabled:$false
Set-Mailbox -Identity "identity" -RemoveDelayHoldApplied

Items cannot be deleted from mailbox’s “deleted items” even using MFCMAPI.

Hey,

Just recently I’ve got this weird issue.

Mailbox got stuck. I was able to remove emails from inbox folder and subfolders, even from the Recovery Items folder BUT… not from the deleted items folder.

The behaviour was weird – I was removing some emails and they were reappear after some time, same with MFCMAPI – was clicking hard delete and these bastards didn’t even move.

I was even not able to move the mailbox as it was telling me that mailbox exceeded the quota – I knew it – well, let me remove these emails then!!!

The reason for that appeared very trivial, I’ve been mentioning about this mechanism here: https://paweljarosz.wordpress.com/2015/09/08/singleitemrecovery-in-exchange-2013-recovering-emails-from-purges-folder-with-search-mailbox-cmdlet/

Mailbox had litigation hold enabled and the “Purges” folder on the mailbox got filled up to 100GB. I thouhgt that these emails will be moved to archive but somehow these were still in the mailbox space causign the issue.

Removing the litigation hold allowed to finally delete the emails from deleted items.

Just as a reminder to check what is the size of the “Purges” folder run:

Get-MailboxFolderStatistics -Identity “<mailbox_name>” -FolderScope RecoverableItems -IncludeAnalysis | ft