0
votes

I was developing an Asp.Net web application that will execute particular PowerShell Commands for Office 365. The code contains two parts of the commands (Exchange Online and MSOnline Command). The code is working fine locally on my PC. But When I published the code into Azure Web App the Exchange Online Commands are working as I expected it, but MSOnline commands are giving the below error:

The term 'Connect-MsolService' 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.

I am sure that this error has raised because it did not find the matched MSOnline dlls files to import the module. I have added the dll's using Kudo but also the same. anyone have any idea how to solve this one.

Thank you always

1

1 Answers

0
votes

Doing some reading here and here, it looks like you aren't allowed to install the prerequisites needed unless you upgrade (the answer in that second link describes that).

I have had to do this too: call PowerShell from C# for Office 365 administration, so I feel your pain :) although we host on a normal Windows server.