I had this issue and couldn´t find any answer. The issue was that I was trying to use Azure cdmlets to connect to O365 via c# code, but I couldn´t get the connect-msolservice
.
""The term is not recognized" error when you try to run administrative Windows PowerShell cmdlets in Office 365"