Manually Installing Packages/Modules Required for Monitoring Office 365 Environments
The eG agent runs Powershell cmdlets to pull a few metrics from an Office 365 environment. To enable the eG agent to run these cmdlets, the following need to be installed and run on the eG agent host:
-
A 64-bit version of the Microsoft Entra Module for Windows PowerShell:To install this module, do the following:
- First, install the PackageManagement and PowerShellGet modules 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
- Once the PackageManagement and PowerShellGet modules are successfully installed, open Windows PowerShell ISE in elevated mode on the eG agent host.
-
Next, run the following cmdlet to install the Microsoft Graph Module:
Install-Module -Name Microsoft.Graph
-
Then, proceed to install the Exchange Online Management Module. For this, run the following cmdlet from the PowerShell prompt in the elevated mode:
Install-Module –Name ‘ExchangeOnlineManagement’ - Force
-
Now, install the SharePoint Online Management Shell, which is key for monitoring SharePoint Online. For that, run the following cmdlet in the elevated mode:
Install-Module –Name ‘Microsoft.Online.SharePoint.PowerShell ’ - Force
-
Then, install the Network Assessment Tool for Microsoft Teams. For this, you need to download and run the executables from the following URL:
https://download.microsoft.com/download/e/0/2/e026d13b-9b1b-472a-b322-616c6e6d9c19/MicrosoftTeamsNetworkAssessmentTool.exe
-
Next, install the Microsoft Teams Module, which is important for Microsoft Teams monitoring. For this, run the following cmdlet in the elevated mode:
Install-Module –Name ‘MicrosoftTeams ’ - Force
-
Finally, run the following cmdlet in the elevated mode to install the PnP module:
Install-Module -Name PnP.PowerShell -RequiredVersion 1.10.0
-
Next, open the MTMCallQualityPrerequisites.ps1 file in the <EG_AGENT_INSTALL_DIR>\lib directory in Windows PowerShell ISE and execute that script. These scripts help the eG agent run the Call Quality Check test for Microsoft Teams and pull the desired metrics.
Troubleshooting Failure of the Install-Module Cmdlets
If any the 'Install-Module' cmdlets you issued above fail, then run the following commands one after another, and then re-issue the 'Install-Module' cmdlet that failed, at the prompt:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet –Force
Install-Module PowerShellGet -AllowClobber -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Verifying if Modules are Successfully Installed
To check if the modules are installed successfully, do the following:
-
Open PowerShell ISE in elevated mode, and type Connect-mgGraph within to check if Microsoft Graph is installed properly. If the Windows Auto-complete feature populates the command even before you type it fully, then it is a clear indication that Microsoft Graph is properly installed.
-
Similarly, you can attempt to type the following commands one after another, and see if Auto-complete completes them, to verify if the corresponding module is installed properly:
Connect-ExchangeOnline
Connect-PnPOnline
Connect-MicrosoftGraph