When I tried using New-MailboxExportRequest to export a mailbox to a .pst file I kept getting this error:
New-MailboxExportRequest -FilePath "\\server.domain.com\mailboxexport$\billy.pst" -MailBox "billy"
The server or share name specified in the path may be invalid, or the file could be locked.
+ CategoryInfo : NotSpecified: (0:Int32) [New-MailboxExportRequest], RemotePermanentException
+ FullyQualifiedErrorId : ACDD8B0,Microsoft.Exchange.Management.RecipientTasks.NewMailboxExportRequest
I checked that I could access and write to the share from the CAS servers. No problems there. Then I made sure the AD group “Exchange Trusted Subsystem” had modify access to the share. And that my user had permission to use New-MailboxExportRequest using the command below.
New-ManagementRoleAssignment –Role "Mailbox Import Export" –User "domain\adminuser"
I still got the same error. So I added Verbose to the command to see a more verbose output
New-MailboxExportRequest -FilePath "\\server.domain.com\mailboxexport$\billy.pst" -MailBox "billy" -Verbose
VERBOSE: [13:00:40.329 GMT] New-MailboxExportRequest : The server or share name specified in the path may be invalid,
or the file could be locked. --> The account used is a computer account. Use your global user account or local user
account to access this server.
A you can see the problem is that computer authentication on the share does not work. Some kind of Kerberos issue I think. I tried debugging it by checking SPNs on the computer objects of the CAS servers and the NetApp SAN computer objects in AD, but I could not find what was causing the problem.
My workaround was to run the “Microsoft Exchange Mailbox Replication” service as a service account and not local system.
Create a service account and set the service “Microsoft Exchange Mailbox Replication” to run as it.
Then set modify (or full) permissions to the service account on the share.
Now it should work 🙂