Check the Health of Your Retail Service in Dynamics 365 for Operations with PowerShell

by | Apr 25, 2017 | Dynamics 365 for Finance and Operations, Performance, Set Up

A Production environment for Dynamics 365 for Operations (D365) is hosted by Microsoft and the underlying physical virtual machines are not exposed to the client. This is in stark contrast to a UAT, Test or Dev environment hosted by Microsoft for D365. The latter environments expose the RDP connection information as well as credentials which allow direct access to the VM’s as well as the underlying AOS services. This can make troubleshooting live issues a challenge in some scenarios when logging into a server is not possible.

If you have a Dynamics 365 for Operations with Retail deployment, it can be especially critical to be able to quickly check the health of the Retail Service (real-time service).  The real-time service is the backbone for the Microsoft Point of Sale (MPOS) client. It provides the communication channel between MPOS and the retail channels. Lifecycle Services (LCS) provides an Environment Monitoring portal for each service (the Retail Server is shown below), however, this requires logging into LCS, navigating to the Environment Monitoring Page and clicking on the Retail server.  You could bookmark the page for faster access, but this still won’t select the specific service view as it defaults to the AOS view.

Health_RetailServiceDynamics365forOperations_PowerShell_JoshLee1

A quick real-time service check can be performed by:

  1. Opening a web browser
  2. Entering: https://[PROD_URL]/healthcheck?testname=ping
  3. Hitting enter

This will perform a quick ping check on both the database and real-time service.  The results will show if the database and real-time service is up:

Health_RetailServiceDynamics365forOperations_PowerShell_JoshLee2

Or down:

Health_RetailServiceDynamics365forOperations_PowerShell_JoshLee3

Monitoring

With PowerShell, you could create a simple script that checks the service state, schedule it in Windows Task Scheduler to check it on a specific frequency and get failure notifications via email.  Here is a simple example of how you might accomplish this. Please note that this is a very basic example and is simply meant to demonstrate how you might accomplish this task in a few lines of code.  In a production scenario you would want a more robust solution and would not want to be prompted for credentials to email out the notification (for example use an encrypted file for the -Credential parameter rather than entering it as shown in the code below):

And here is the email notification informing you of an outage condition:

Health_RetailServiceDynamics365forOperations_PowerShell_JoshLee4

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

february

27feb11:00 am12:00 pmConfab With Stoneridge - Livestream - Cool Features in Dynamics 365 Business Central

march

04mar12:00 pm12:30 pmPower BI & Reporting with Dynamics 365 Customer Engagement

04mar2:00 pm3:00 pmHow to Incorporate the Power Platform with Dynamics 365 Finance and Supply Chain Management

12mar11:00 am12:00 pmConfab With Stoneridge - Livestream - Power Apps AI Builder

18mar12:00 pm1:00 pmMoving from CRM On Prem to the Cloud – Is it worth It?

18mar2:00 pm3:00 pmThe Past, Present, and Future of Dynamics 365 with Machine Learning and Artificial Intelligence

25mar2:00 pm3:00 pmAchieve Total Data Access & Future-Proof Your Reporting

26mar11:00 am12:00 pmConfab With Stoneridge - Livestream - Portals

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X