Import-Module ExchangePowerShell returns Exception: Exchange Server system variable ExchangeInstallPath missing.

Sebastian Buus Jensen 21 Reputation points
2025-02-13T07:56:24.86+00:00

Hi All,

When I run Import-Module ExchangePowerShell I get the Exciption: Exchange Server system variable ExchangeInstallPath missing.

The command I need to run is only available in module ExchangePowerShell, I can't use ExchangeOnlineManagement, it's missing the Get-RecoverableItems command.

And I don't know the ExchangeInstallPath to our ExchangeOnline :)

Any way to by pass that "ExchangeInstallPath missing"?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2025-02-14T06:19:38.27+00:00

    Hello, @Sebastian Buus Jensen,

    Welcome to the Microsoft Q&A platform!

    After my test, the Get-RecoverableItems command is available in ExchangeOnlineManagement. If you could not use it in this module, there may be some mistakes during your using process. For example, make sure you have Connect-ExchangeOnine before using the command. Below are my test results for your reference:

    User's image

    If you still encounter error when using command Get-RecoverableItems, you need to check whether the version of your Windows PowerShell is the newest and if you have correct permissons to run this command. According to the official document, this command is available only in the Mailbox import Export role and by default, the role is not assigned to any role groups.

    User's image

    Should you need more help on this, you can feel free to post back. 


    If the answer is helpful, please click on “Accept answer” as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang


0 additional answers

Sort by: Most helpful

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.