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

Reply
  • 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

Children