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.