I need to remove the in-place archive for an Office 365 user that is DirSync'd from AD.
I've tried the following command in powershell and also tried disabling the archive in the EAC but getting an error:
Command: Disable-Mailbox -identity "user" -archive
Error: The action 'Disable-Mailbox','Archive', can't be performed on the object 'user' because the object is being synchronised from your on-premises organisation. This action should be performed on the object in your on-premises organisation.
I have looked at the attributes on the user's object in AD. I cannot change the msExchArchiveStatus from 1 to 0 or nothing as it is repopulated with 1 when the DirSync runs. I have also changed the msExchRemoteRecipientType from 3 to 1 (as it was changed from 1 to 3 when the archive was originally added) but this has made no difference.
I assume I am missing a step but am struggling to work out what it is, please help.