SOLVED

Set-SyncMailbox cmdlet failed

%3CLINGO-SUB%20id%3D%22lingo-sub-1311774%22%20slang%3D%22en-US%22%3ESet-SyncMailbox%20cmdlet%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1311774%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20Office%20365%20I%20have%20this%20error%20message%20in%20the%20GUI.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExchange%3A%20The%20execution%20of%20cmdlet%20Set-SyncMailbox%20failed.%3C%2FP%3E%3CP%3EExchange%3A%20An%20unknown%20error%20has%20occurred.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20looked%20for%20this%20cmdlet%20and%20haven't%20been%20able%20to%20find%20it%20yet.%20Does%20anyone%20have%20a%20reference%20to%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1311774%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1313401%22%20slang%3D%22en-US%22%3ERe%3A%20Set-SyncMailbox%20cmdlet%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313401%22%20slang%3D%22en-US%22%3E%3CP%3EThat's%20a%20cmdlet%20that%20was%20used%20back%20in%20the%20Live%40EDU%20days...%20I%20don't%20think%20any%20O365%20customer%20has%20access%20to%20it%20anymore.%20Best%20open%20a%20support%20case.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2048699%22%20slang%3D%22en-US%22%3ERe%3A%20Set-SyncMailbox%20cmdlet%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2048699%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20same%20issue%20here%3A%3C%2FP%3E%3CP%3E%3CSPAN%3EExchange%3A%20The%20execution%20of%20cmdlet%20Set-SyncMailbox%20failed.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Efor%20a%20user%20where%20the%20license%20was%20remove%20time%20ago%2C%20then%20re-added%20and%20the%20exchange%20mailbox%20doesn't%20get%20created.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESo%20this%20is%20still%20around.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2207152%22%20slang%3D%22en-US%22%3ERe%3A%20Set-SyncMailbox%20cmdlet%20failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2207152%22%20slang%3D%22en-US%22%3EI%20have%20the%20same%20problem%20at%20the%20moment%2C%20and%20it%20looks%20as%20though%20my%20situation%20is%20similar%20to%20this%20IE%20a%20licence%20was%20removed%20at%20some%20point%2C%20and%20re-instated%20later%20at%20some%20point.%3CBR%20%2F%3E%3CBR%20%2F%3EIt's%20definitely%20still%20around%20though%3C%2FLINGO-BODY%3E
Occasional Contributor

In Office 365 I have this error message in the GUI.

 

Exchange: The execution of cmdlet Set-SyncMailbox failed.

Exchange: An unknown error has occurred.

 

I have looked for this cmdlet and haven't been able to find it yet. Does anyone have a reference to this?

 

 

5 Replies
best response confirmed by stephen_dxc122 (Occasional Contributor)
Solution

That's a cmdlet that was used back in the Live@EDU days... I don't think any O365 customer has access to it anymore. Best open a support case.

I have the same issue here:

Exchange: The execution of cmdlet Set-SyncMailbox failed.

for a user where the license was remove time ago, then re-added and the exchange mailbox doesn't get created. 

So this is still around.

I have the same problem at the moment, and it looks as though my situation is similar to this IE a licence was removed at some point, and re-instated later at some point.

It's definitely still around though

@milesreid 

 

If you have arrived here then the original method must not have worked or if you have arrived here first please check out our original blog on fixing this issue here.. If the original method didn’t work don’t panic! We will be sure to sort it out with this one, so the steps for this method are as follows:

  1. make the mailbox soft deleted by removing the Exchange Online license and in the Exchange Management Console find the user, right click and disable them.
  2. In Active Directory move the user into an OU that doesn’t sync with Office 365.
  3. Run the AAD sync cycle.
  4. Open a PowerShell Window as Administrator and type the following commands:

Connect-MsolService

Remove-MsolUser -UserPrincipalName “firstname.lastname” -RemoveFromRecycleBin -Force

5. Run the AAD sync cycle.

6. Move the user back into a syncing OU.

7. Once again run the AAD sync cycle.

8. Perform a mailbox restore as you did in the previous blog using the following commands.

Get-Mailbox -softdeletedmailbox -identity example.user | *exchangeguid*

Get-Mailbox example.user | fl *exchangeguid*

New-MailboxRestoreRequest -sourcemailbox <guid of the disconnected mailbox> -targetmailbox <guid of new mailbox> -AllowLegacydnMissmatch

9.  Now you will need to add all the necessary AD attributes to the account, this includes the SMTP addresses in the proxy settings, target             address, and mailnickname.

 

Once done you should no longer have any issues, thanks for reading and please take a look at some of our other blogs on fixes and upcoming updates!

Thanks for adding this. I am sure it will help.