Exchange: IDM PowerShell Service Response ERROR: The term 'Enable-Mailbox' is not recognized

  • 7012362
  • 03-May-2013
  • 31-Jul-2017

Environment

NetIQ Identity Manager Driver - Active Directory
NetIQ Identity Manager - Remote Loader
NetIQ Identtiy Manager - IDM Exchange PowerShell Service
Microsoft Exchange 2013
Microsoft Exchange 2010

Situation

When using the 'homeMDB' or 'psExecute' attributes to run Exchange commands the IDM Powershell Service will return:

Exchange: IDM PowerShell Service Response ERROR: The term 'Enable-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.


Resolution

Remote Loader documentation is available here.

The main difference between the IDM Exchange 20xx Service(s) and the IDM PowerShell Service is that previously the services were using "Local Runspace" to load the Exchange Management environment, and the IDM PowerShell Service is using "Remote Runspace".

Changes to how it handles Exchange Management Tools:
  • it is not required to install the Exchange Management Tools on the Remote Loader Server
  • as there is no way to control which Exchange server the Service is talking to, Exchange Management Tools must be installed on all Exchange Servers

Changes to how it handles access rights:
  • if the IDM PowerShell Service is run as "local system", then the server where it runs must be a member of "Organizational Management"
  • if the IDM PowerShell Service is run as a user, then the user must be a member of "Recipient Management" and "View-Only Organization Management” (this is the preferred option)

Verify that all exchange servers are configured to allow remote PowerShell connections.  The above error has been seen when only certain exchange servers allow remote connections, not all of them.

If the all the above rights/configuration check out properly and the error is still encountered, ensure that there is only instance of the AD driver shim configured on the server where the service is running.