Monitoring Office 365 Productivity Services with AppManager

over 5 years ago
Many times, I hear people complaining about AppManager that it is not capable of monitoring Office 365 productivity services that are enabled over the Internet (cloud services), such as Skype For Business and Exchange Online Hosted Email for Business.

At a glance, AppManager seems to be a product which can only monitor the on-premises applications, but over a period of time this product has evolved so much that it can do almost everything in the cloud easily with the admin application knowledge.

MS provides the subscription for the productivity services, but along with that, it also provides the solution to manage and report the critical metrics to match the threshold by PowerShell commands. I am going to use these PS commands for reporting the critical metrics in this post. By this point, you might have guessed a bit what I am going to use from AppManager but if not, then read below to overcome from the suspense.

Metrics for Exchange Online:

With AppManager for WinOS monitoring, you will get the “RunCommand” KS under the “PowerShell” category which is capable of executing the PowerShell commands. This KS, I am going to use in my example to show how you can get the mailbox critical statistics:

  1. The very first thing you will do is to create a Windows PowerShell session to the remote location. For this, you need to figure out the “ConnectionURI” parameter. Once identified use this connection URI along with your credential (Which can be stored in XML) to create the PS session into the variable which later can be imported.

    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential (Import-Clixml C:\MyCred.xml) -Authentication basic -AllowRedirection

  • Now you can import this session as below:

    Import-PSSession $session

  • Now you can use Get-Mailbox cmdlet to get a Mailbox User report.

  • You can simply pipe the result from Get-Mailbox to Get-MailboxStatistics.

  • If you need a report of the number of active mailboxes and the number of created accounts, you can use the Get-MailboxActivityReport cmdlet from this KS.

You can put together all of the above in a PS script file and execute the script to report the metrics for Exchange online. I used the simple example, but you can broaden the scope of monitoring by using a few other exchange online PS commands mentioned here.

Metrics for Skype For Business Online:

In my above example, I explained about the exchange commands and its usage through the AppManager “RunCommand” KS, in a similar way, one can do it for Skype for business online as well. The very first thing that you would do is to create a PowerShell session to the remote location as follows:

  1. Get the credential in variable

    $credential = Get-Credential

    Type in the username and password. Create a session using this variable:

    $session = New-CsOnlineSession -Credential $credential

    This will connect to the online services.

  • Import this session:

Import-PSSession $session

  • Now as mentioned here, you can use any of the listed PS commands to report the critical metrics.

Magic! Seriously it’s not magic. It’s just that AppManager provides the framework to do almost everything but this framework is not just explored enough. I am trying to explore this framework to manage online services offered by the third parties like MS. Enjoy!


How To-Best Practice
Comment List
Related Discussions