Issue
Orchestration activity is failing with below error in ECC Queue:
<hresult>-2146233087</hresult>
<error>`The term 'Get-DistributionGroup' 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.HRESULT: [-2146233087]
Stack Trace:
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
</error>
Release
All Versions.
Cause
The script which is supposed to run through Orchestration activity should first be executed from the MID server's command prompt.
In this case, the 'Get-DistributionGroup'
is not installed or configured on the MID Server.
Resolution
- Get-DistributionGroup is an Exchange cmdlet. You'll need to install the Exchange Management Tools, or connect to a management session on an Exchange server.
- Get-DistributionGroup cmdlet is available in on-premises Exchange and in the cloud-based service.
- This is used to administer the Active Directory remotely.
- You can also refer to the below Microsoft documentation regarding installation of Exchange Management tools on your Windows machine: https://docs.microsoft.com/en-us/exchange/plan-and-deploy/post-installation-tasks/install-management-tools?view=exchserver-2019