RPC Error -2147220992 with Start-ManagedFolderAssistant on Office 365 Mailboxes

Work around RPC error -2147220992 from Start-ManagedFolderAssistant by passing the user's primary mailbox GUID instead of their address.

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 “user@example.com.au

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 “user@example.com.au” 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 user@example.com.au | 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:

Start-ManagedFolderAssistant aace1f4e-feed-ace0-babe-466f1deed1d1

Comments