I’ve got a few users who have recently filled up their mailboxes (I thought 50 GB was a huge amount of email, apparently not), and I urgently needed to free up some space.
I assigned the users an Exchange Online Archiving licence and set a sensible default retention policy, but then wanted to start the Managed Folder Assistant straight away, instead of waiting for it to run by itself at some stage over the next 24 hours.
Logging into Office 365 via PowerShell is the way to do it – log in and then run
Start-ManagedFolderAssistant -Identity "[email protected]"
I ran this in two separate customer tenancies this morning, and in both cases got an RPC error, along the lines of:
PS /Users/kai> Start-ManagedFolderAssistant -Identity "[email protected]" The call to Mailbox Assistants Service on server: 'whatever.prod.outlook.com' failed. Error from RPC is -2147220992. CategoryInfo : InvalidOperation: (:) [Start-ManagedFolderAssistant], TaskException FullyQualifiedErrorId : [Server=SOMETHING,RequestId=cd265b1d-ef2a-cafe-babe-23147a5f1123,TimeStamp=18/07/2019 2:32:28 AM] [FailureCategory=Cmdlet-TaskException] DEADBEEF,Microsoft.Exchange.Management.SystemConfigurationTasks.StartElcAssistant PSComputerName : outlook.office365.com
Well, this didn’t look good.
As it turns out, thanks to a helpful blog post from Tim McMichael on TechNet, there’s an easy solution. Look up the GUID of the user’s primary mailbox and then use this as the identity for the Managed Folder Assistant.
get-mailboxLocation –user [email protected] | fl mailboxGuid,mailboxLocationType
If you have archiving enabled, then this returns two GUIDs, one for the Primary and one for the MainArchive mailboxes.
Grab the GUID for the Primary mailbox, and use it like so: