PS C:\windows\system32> Connect-ExchangeOnline error

Rice, Jason 5 Reputation points
2024-08-01T18:13:41.95+00:00

The process cannot access the file 'C:\Users\xxxxxxxx\AppData\Local\Temp\tmpEXO_02egxx50.oaf\tmpEXO_02egxx50.oaf.psm1' because it is being used by another process.

At C:\Users\xxxxxxxx_LDA\Documents\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\ExchangeOnlineManagement.psm1:766 char:21

+

                  throw $_.Exception;
  ```+ 
  ```dockerfile
                  ~~~~~~~~~~~~~~~~~~
  • CategoryInfo : OperationStopped: (:) [], IOException
  • FullyQualifiedErrorId : The process cannot access the file 'C:\Users\xxxxxxx\AppData\Local\Temp\tmpEXO_02egxx50.oaf\tmpEXO_02egxx50.oaf.psm1' because it is

being used by another process.

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,598 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Jagadeesh Mahalingam 0 Reputation points
    2024-08-02T09:55:49.7+00:00

    It is compatible with PowerShell version 7.0; try installing PowerShell 7.

    0 comments No comments

  2. Noah Ma-MSFT 2,725 Reputation points Microsoft Vendor
    2024-08-05T10:05:30.4966667+00:00

    Hi @Rice, Jason,

    Welcome to the Microsoft Q&A platform!

    It seems like you're facing process error when you connect to ExchangeOnline via PowerShell.

    Please kindly ensure there are no other applications are using the file. You could open Task Manager and look for processes that might be using the file. Also, please try to reinstall the ExchangeOnlineManagement Module to see if it works.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it.


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.