The term 'New-Mailbox' is not recognized as the name of a cmdlet. Powershell

I am getting the error shown below whenever i invoke New-Mailbox command in invoke power shell activity. before invoking this activity im running a script to import required modules for new-mailbox to work I am attaching screenshot of my workflow as well. Any help will be appreciated. Thanks

19.7.0+Branch.master.Sha.8c253d13718eed5c7db27daef6facd1fe1b0d067

Source: Invoke Power Shell (Throw)

Message: The term ‘New-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.

Exception Type: System.Management.Automation.CommandNotFoundException

RemoteException wrapping System.Management.Automation.CommandNotFoundException: The term ‘New-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.
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Good morning @rameezimtiaz,

Please let me know if this solution resolves your issue.

Proposed Solution

Open PowerShell with elevated privileges and execute the following command.

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;

Explanation

The above command when executed imports the exchange module into PowerShell session.

its works in powershell but how to run this in uipath studio?

This works but in powershell but when i try and run it in uipath studio it says one or more errors occurred