Error : Timeout exceeded during script execution for Microsoft 365, Exchange Online, SharePoint Online, Skype for Business Online, Microsoft Teams monitors

Error : Timeout exceeded during script execution for Microsoft 365, Exchange Online, SharePoint Online, Skype for Business Online, Microsoft Teams monitors

Perform the following steps on the Applications Manager installed machine and send us the output to troubleshoot further:
  1. Open Powershell as administrator by right-clicking and selecting the 'Run as administrator' option.
  2. Navigate to <Applications Manager Home>\working\conf\application\scripts\powershell directory.
  3. Execute the following command for the respective monitor type:
For Microsoft 365 :
.\Office365Metrics.ps1 'TenantName' 'AdminUserEmail' 'Password'
For Exchange Online :
.\ExchangeOnlineMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password' 'TopMailboxes,InactiveMailboxes'

For Sharepoint Online:

.\SharepointOnlineMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password' 

For Skype For Business Online:

.\SkypeForBusinessOnlineMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password'
For Microsoft Teams :
.\MicrosoftTeamsPowershellMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password'
.\MicrosoftTeamsAPIMetrics.ps1 'TenantID' 'ClientID' 'ClientSecret'
  1. Copy the full output to a text file.

To find the script execution time: 
To analyze the time taken for the above scripts, execute the above scripts as mentioned below once again, and share screenshots of time taken in addition to script output from the above scripts:
Measure-Command {.\ExchangeOnlineMetrics.ps1 'TenantName' 'AdminUserEmail' 'Password' 'TopMailboxes,InactiveMailboxes' }
  1. Based on the time taken, increase the Polling interval and Timeout values for the particular monitor. When the polling interval is increased, the health and availability will be checked only at that particular time interval.
  2. For Exchange Online monitor if huge data is found and takes a very long time, set the timeout value accordingly, and set custom polling interval by following the below steps:
    1. Go to Admin -> Performance Polling -> Optimize data collection
    2. Choose Monitor Type as Exchange Online.
    3. For both Top Mailboxex By Size and Inactive Mailbox Users metrics, choose Collect data at customized time interval option.
    4. Set the value as 24 Hrs to fetch this data once in a day and click Save.
If the issue still persists share the above outputs, screenshots of the above-mentioned page, monitor information page, edit monitor page, and the latest SIF for analysis. Enable print all logs, poll the monitor couple of times, wait for the polling to be completed, then generate the Support Information File (SIF) and reach out to our support team at appmanager-support@manageengine.com