Are you trying export mailbox into a PST (or import PST into mailbox)? And you are stuck here with this message.
Unable to open PST file ‘\\FileServer\Share\JohnDoe.pst’. Error details: Access to the path ‘\\FileServer\Share\JohnDoe.pst’ is denied.; Microsoft.Exchange.MailboxReplicationService.RemotePermanentException: Access to the path ‘\\FileServer\Share\JohnDoe.pst’ is denied.
There is a simple explanation and solution.
Mailbox Import and Export process is handled by Exchange MRS component. If you check the Microsoft Exchange Mailbox Replication service properties, you will see the service is running under “Local System account”. That means the file share location you specified in the New-MailboxExportRequest or New-MailboxImportRequest doesn’t have permissions to Exchange Trusted Subsystem.
The solutions as you guessed enable Read/Write permissions to Exchange Trusted Subsystem for the network location (NTFS and Share permissions). Try again.
If you haven’t got the whole point of this setup, here it is. You should have create a special share with locked down permissions to export mailboxes.