Forum Discussion
Set-SyncMailbox cmdlet failed
- Apr 16, 2020
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.
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.
- martinmdcaJan 11, 2021Copper Contributor
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.
- milesreidMar 13, 2021Copper ContributorI 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- DVillamizar_CSASep 22, 2021Copper Contributor
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:
- 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.
- In Active Directory move the user into an OU that doesn’t sync with Office 365.
- Run the AAD sync cycle.
- 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!