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

 

Related Posts

0 Comments

Submit a Comment

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

Upcoming Events

july

07jul1:00 pm1:30 pmHow to Implement Microsoft Dynamics: Bringing It All Together

08jul10:00 am11:00 amOn the Job with Dynamics 365 - Manufacturing Planner

08jul2:00 pm2:30 pmHow Ag Retailers and Ag Coops Should Structure IT Resources for the Future

16jul11:00 am12:00 pmConfab with Stoneridge - Livestream - Business Intelligence Power Hour

22jul10:00 am11:00 amOn the Job with Dynamics 365 - Manufacturing Material Handler

22jul12:00 pm1:00 pmImprove Field Service Delivery and Increase Customer Satisfaction

august

05aug10:00 am11:00 amOn the Job with Dynamics 365 - Manufacturing Shipping / Receiving Department

05aug12:00 pm1:00 pmHow Ag Retailers Can Simplify Processing Equity Payments using Levridge

12aug10:00 am10:30 amWhy Levridge Grain? How to Achieve Efficient and Accurate Scale Tickets

12aug12:00 pm1:00 pmThe Three Paths to Dynamics 365 Finance and Supply Chain from Dynamics AX

13aug11:00 am12:00 pmConfab with Stoneridge - Livestream - Dynamics 365 2020 Wave 2 Review

19aug10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

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