Error executing O365 Script "MSOnline"

Hello community,

i can not run exchange online cmdlets in the script environment of Active Roltes 7.4.3 

I use the following code snippet:

$context.O365ImportModules("msonline")

$res = $context.O365ExecuteScriptCmd("get-mailbox test@test.com | select ExchangeGUID" )

I do get the error that the cmdlet "get-mailbox" is not know. Can you help me out here??? Thanks!

Best regards,

Michael

Parents
  • Hi,

    yes the msonline module is installed. But the get-mailbox cmdlet is an exchange online cmdlet so the question is how to work with exchange online in the quest powershell scripts. 

    How to import the exchange online cmdlets in the scripting environment

    Thanks for your fast answers! :) 


    Can you further tell me why the edsvaAzureOffice365Enabled virtual attribute is not availableas an attribute when i check the properties in console? I set the "Built-in Policy - Azure - Default Rules to Generate Properties" to the whole OU (with child OUs). The attribute is not there

  • The "MsOnline" reference in the modules loading is misleading.  If available, it does load the Exchange module too.  The one question you haven't answered concerns your Active Roles admin service's connectivity with the tenant - do you have have 3 "green lights" in the tenant configuration in the web UI?

Reply
  • The "MsOnline" reference in the modules loading is misleading.  If available, it does load the Exchange module too.  The one question you haven't answered concerns your Active Roles admin service's connectivity with the tenant - do you have have 3 "green lights" in the tenant configuration in the web UI?

Children