- Configuring meeting security in Microsoft Teams - Fri, Jul 10 2020
- Working from home with Microsoft Teams - Thu, May 14 2020
- Passing the Microsoft Azure Administrator Associate certification - Mon, Mar 25 2019
The Call Quality Dashboard (CQD) available in Office 365 for Microsoft Teams and Skype for Business is not a new tool. It was born from its on-premises server counterpart and translated for cloud usage. CQD is a collection of performance and diagnostic data gathered by the Teams or Skype client during an audio call, video call, or screen-sharing session.
At the end of each session, the client packages and uploads this quality-of-experience data to a central reporting database. CQD provides a portal for analyzing this data and providing additional insights into the quality of these services. For example, you can build custom reports to see where on the corporate network audio calls are performing poorly.
CQD allows for building reports and tables of data and provides a mechanism for extracting the data in the portal. However, if you have multiple reports used to extract data on a regular basis, this can be a tedious process to export the data from the portal manually. To assist with this process, Microsoft has built an API that allows extraction of this data, and on top of that, they have provided a PowerShell module that uses simple commands to extract the data.
If you are unfamiliar with CQD, I would suggest checking out the following resources first:
First, let's discuss how to install this PowerShell module. Microsoft provides this module via the PowerShell Gallery repository. Hosting the module here allows for installing it directly from a PowerShell prompt using the Install-Module command. If you have never installed a module from the PowerShell Gallery, you may receive prompts about installing additional software as well as trusting the remote repository.
The CQDPowerShell module has three commands:
While Get-CQDData is the workhorse in this module, we will not get far without the dimensions and measures. Dimensions and measures determine what kind of data we want to extract and how to group the data. Running the Get commands will display the property names we need later. These are some examples of the dimensions and measures returned from these commands:
Before we get into extracting data using these properties, let's look at a built-in report in CQD to understand why they are important. This is a typical report with the number of good, unclassified, and poor audio streams as well as the percent of poor audio streams. Given this is a small demo tenant, there's not much in the way the chart looks, but that's not what we're focusing on.
If we edit this report, we will see that these chart properties are all measurements, and they are grouped by month and year or a dimension:
Looking at the left side of the edit window, we see the full names of the dimensions and measures used for building the report. Using the Get-CQDDimensions and Get-CQDMeasures commands and some filtering, we can find the equivalent names of these properties for our PowerShell command:
These are translations from the CQD report to the PowerShell equivalents:
- Month Year > AllStreams.Month Year
- Audio Good Call Stream Count > Measures.Audio Good Call Stream Count
- Audio Poor Call Stream Count > Measures.Audio Poor Call Stream Count
- Audio Unclassified Call Stream Count > Measures.Audio Unclassified Call Stream Count
- Audio Poor Call Percentage > Measures.Audio Poor Call Percentage
We now have all the pieces to get the CQD through our PowerShell command. The Get-CQDData command has several parameters, but the ones we are interested in for now are Dimensions, Measures, and OutPutType. We will build the command using the PowerShell names of the same dimensions and measures used in our report. Since there are spaces in them, we need to enclose each one in quotes and separate multiple ones with commas, and we will output the data into a DataTable:
Get-CQDData -Dimensions 'AllStreams.Month Year' -Measures 'Measures.Audio Good Call Stream Count','Measures.Audio Poor Call Stream Count','Measures.Audio Unclassified Call Stream Count','Measures.Audio Poor Call Percentage' -OutPutType DataTable
By running this command, we now have the same data from our report listed in a PowerShell window, and we can save it to a variable or export it to a CSV file using other parameters of Get-CQDData. From here, I would recommend continuing to build reports in the CQD portal, and at the same time, find the PowerShell names of the dimensions and measures to build the equivalent command. This will allow you to automate the extraction of the data to ingest it into other tools for analysis. This can be a big time-saver if you are constantly going into the CQD portal to download this data manually.