r/exchangeserver • u/Astroboy970 • 29d ago
Disable Mailbox -Identity **** -PermanentlyDisable Command no longer working
Pros!!
I used to be able to run the command Disable Mailbox -Identity **** -PermanentlyDisable via powershell, but in the last month I have noticed, I am getting this error message
How can i go about resolving this? What we are looking for is to disable/purge the mailbox of users while keeping the AD account intact
:
shines@abc.com - failed: ||Error on proxy command 'disable-Mailbox -Confirm:$False -PermanentlyDisable:$True -ErrorAction:'Stop' -Identity:'shines@abc.com'' to server ME3PR01MB69
5.ausprd01.prod.outlook.com: Server version 15.21.056.0000, Proxy method PSWS:
InternalServerError: Error executing cmdlet : {
"code": "InternalServerError",
"message": "Error executing cmdlet",
"details": [
{
"code": "AadDualWriteFailure",
"message": "|Microsoft.Exchange.Configuration.DualWrite.LocStrings.UnableToWriteToAadException|An Azure Active Directory call was made to keep object in sync between Azure Active Directory an
d Exchange Online. However, it failed. Detailed error message:\r\n\tUnable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migrati
on. DualWrite (Graph) RequestId: 877abcebf-dbcc-4d5f-8813-d2435c1014ee\r\nThe issue may be transient and please retry a couple of minutes later. If issue persists, please see exception members for m
ore information.",
"target": ""
}
],
"innererror": {
"message": "Error executing cmdlet",
"type": "Microsoft.Exchange.Admin.OData.Core.ODataServiceException",
"internalexception": {
"message": "Exception of type 'Microsoft.Exchange.Management.PSDirectInvoke.DirectInvokeCmdletExecutionException' was thrown.",
"type": "Microsoft.Exchange.Management.PSDirectInvoke.DirectInvokeCmdletExecutionException"
}
},
"adminapi.warnings@odata.type": "#Collection(String)",
"@adminapi.warnings": []
} [Server=SY2PPF67CDB8BA3,RequestId=c30f213b-cfdf-7ece-3595-dc17b6c9e83b,TimeStamp=10/28/2026 1:13:07 AM] .
3
u/worldsdream 29d ago
Follow this: https://o365info.com/remove-mailbox-microsoft-365/
It shows exactly how to remove the mailbox but keeps the user account.
1
u/7amitsingh7 27d ago edited 27d ago
This error may occur if the user account is synced from on-premises Active Directory or is currently being migrated. I would check the directory sync and migration status first and retry the command after a few minutes. If it still fails then Microsoft support may need to investigate the issue.
Is this mailbox associated with an on-premises synced Active Directory account, or is any migration currently in progress?
0
u/saltyslugga 28d ago
That error points to an on-prem mastered object or a migration in progress. I’d check the recipient type and migration status first.
For a synced remote mailbox with no migration running, remove its Exchange Online license, run
Disable-RemoteMailboxin on-prem Exchange, then sync; the AD account stays intact. Disabling doesn’t guarantee an immediate purge: mailbox retention and any holds still apply.