Closed Leni-Vietz closed 3 months ago
I suspect the issue is that you are trying to copy from the archive mailbox of one user to the primary mailbox of another. Does it work from primary to primary? Note thatin this scenario, the authenticating account needs FullAccess permission to both mailboxes (or if impersonating the source, the source mailbox needs FullAccess permission to the target).
The user has access FullAccess to mailbox2021@domain.pl and my account from which I run the scripts has access to both his and the 2021 archive.
Would it be a workaround to disable archiving of old messages for mailbox@domain.pl. Move the messages from archive of mailbox@domain.pl to the main mailbox and then move from non-archive to mailbox2021@domain.pl?
PS C:\Users\user\scripts> Get-EXOMailboxPermission mailbox2021@domain.pl
Identity : Archiwum 2021 mailbox20221115084334
User : NT AUTHORITY\SELF
AccessRights : {FullAccess, ReadPermission}
IsInherited : False
Deny : False
InheritanceType : None
Identity : Archiwum 2021 mailbox20221115084334
User : NT AUTHORITY\SELF
AccessRights : {FullAccess, ExternalAccount, ReadPermission}
IsInherited : False
Deny : False
InheritanceType : Descendents
Identity : Archiwum 2021 mailbox20221115084334
User : admin@domain.pl
AccessRights : {FullAccess}
IsInherited : False
Deny : False
InheritanceType : All
Identity : Archiwum 2021 mailbox20221115084334
User : mailbox@domain.pl
AccessRights : {FullAccess}
IsInherited : False
Deny : False
InheritanceType : All
PS C:\Users\user\scripts> Get-EXOMailboxPermission mailbox@domain.pl
Identity : mailbox
User : NT AUTHORITY\SELF
AccessRights : {FullAccess, ReadPermission}
IsInherited : False
Deny : False
InheritanceType : All
Identity : mailbox
User : admin@domain.pl
AccessRights : {FullAccess}
IsInherited : False
Deny : False
InheritanceType : All
I also tried using the -Impersonate
parameter and it didn't change the outcome.
I didn't get a chance to look into this until recently, but I can confirm that copying from one user's archive mailbox to another is not supported in EWS. You'll need to move items via a primary mailbox (so your workaround should work).
Hi,
first of all - thank you for this marvellous script. Really helps with users without self-mailbox-control ;)
I'm copying a emails with the following command:
and I get the following:
No matter how many times I run the script there are still those 2534 items. Is there any workaround or parameters to add to deal with this? :)