ediscovery pst export tool in PowerShell returns fatal error

JayCarper-5747 356 Reputation points
2022-08-18T22:10:43.533+00:00

I'm trying to automate the download of pst exports by running the eDiscovery PST Export Tool with command line options, but within . Here's the command line:

C:\<path>\microsoft.office.client.discovery.unifiedexporttool.exe -Name $PstExportName -Source $PstSource -Key $PstKey -Dest $PstDestination -Trace true

This works fine if I am logged into Windows with the same admin credentials I use to launch Powershell. However, if I log into Windows with my regular user account and launch powershell with my admin account, it fails and the trace.log file contains this error:

[2022-08-18 21:41:26.7545][1][Error]: Fatal error happened. System.UnauthorizedAccessException: Access to the path '.\x86' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.Office.Client.Discovery.UnifiedExport.Engine.Lite.LiteExportEngine.LoadDBBinaries()
at Microsoft.Office.Client.Discovery.UnifiedExport.Engine.Lite.LiteExportEngine.<ServerJobMonitorLoop>d__7.MoveNext()

Any ideas what it is trying to access and why it doesn't work?

Update: The command also works if launched via scheduled task under my admin account credentials when no user is logged into Windows. The only time it doesn't work is if I'm logged into Windows as a standard user and PowerShell is running under admin credentials.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jame Xu-MSFT 4,191 Reputation points
    2022-08-19T06:20:54.013+00:00

    Hi @JayCarper-5747
    Please make sure the administrator account you used is a member of Discovery Management role group.
    232782-image.png

    Use the EAC to add a user to the Discovery Management role group:
    Add-RoleGroupMember -Identity "Discovery Management" -Member < user name >

    You can check that the requirements in the following documentation are met:
    https://learn.microsoft.com/en-us/exchange/security-and-compliance/in-place-ediscovery/export-search-results


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Amit Singh 5,306 Reputation points
    2022-08-19T10:08:12.283+00:00

    As shown in the message, you do not have enough permission to install this application.

    Possible solutions:

    • If this is your personal computer, run the executable file as Administrator.
    • If this is an Active Directory (domain) member computer, your user account needs to be either a Power User or Administrator or you need to log in as a Local Administrator.

    Also, check this article for help - https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/ediscovery/cannot-start-ediscovery-pst-export


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.