Troubleshooting Office 365 Monitoring

If the eG agent is unable to report metrics on Office 365 performance, then you may want to check whether/not the Microsoft Azure Active Directory Module for Windows PowerShell and the Microsoft Online Services Sign-in Assistant for IT ;Professionals RTW are properly installed on the eG ;agent host. To perform this check, do the following:

  1. On the eG agent host, click Start, and search for Windows Powershell ISE. Once it is found, run Windows Powershell ISE ;in the elevated mode.
  2. First, check if the PackageManagement module is installed properly. For that, type Install-Module, and see if the auto-complete feature of Windows automatically lists the command you were about to type (see Figure 1).

Figure 1 : Checking if the PackageManagement module has been installed properly

  1. If the command auto-completes, it means that the PackageManagement module has been installed properly. If the command does not auto-complete, then you can conclude that the PackageManagement module has not been installed on the eG ;agent host. In this case, first install this module on the eG ;agent host. You can download the installable from the URL: https://download.microsoft.com/download/C/4/1/C41378D4-7F41-4BBE-9D0D-0E4F98585C61/PackageManagement_x64.msi
  2. If you find that the PackageManagement module has been installed properly, proceed to check if the Microsoft Azure Active Directory Module for Windows PowerShell and the Microsoft Online Services Sign-in Assistant for IT ;Professionals RTW are properly installed on the eG ;agent host. To perform this check, with the Windows Powershell ISE ;in the elevated mode, type the following commands one after another:

    Connect-MSolService

    Get-MsolDomain

    Get-MsolGroup

  3. If these commands auto-complete - i.e., if Windows lists these commands even before you type them fully - you can conclude that the Microsoft Azure Active Directory Module for Windows PowerShell and the Microsoft Online Services Sign-in Assistant for IT ;Professionals RTW are properly installed on the eG ;agent host. On the other hand, if the commands do not auto-complete, then you must proceed to install both the aforesaid modules on the eG ;agent host. ;To know how to install, refer to the Pre-requisites for Monitoring Microsoft Office 365 Environments.

When monitoring large Office 365 environments, you may sometimes run into a 'System.OutOfMemoryException' in powershell. This can happen, if Windows powershell does not have enough memory to process large volumes of data. If you encounter this exception, then you will have to increase the powershell memory of the eG agent monitoring one/more Office 365 components. For this, follow the steps below:

  1. Login to the system hosting the eG agent.
  2. Launch Windows PowerShell in elevated mode.
  3. Execute the following commands one after another:

    sl WSMan:\localhost\Shell

    Set-Item .\MaxMemoryPerShellMB 4096

    cd..

    cd plugin

    Set-Item .\microsoft.powershell\Quotas\MaxConcurrentCommandsPerShell 4096

    Restart-Service winrm