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

by | Updated December 29, 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

september

02sep10:00 am10:30 amThe Modern Manufacturer - Cycle Count Management

02sep12:00 pm12:30 pmBest Practices for Work Order Planning and Routing for Field Service Companies

09sep10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

09sep12:00 pm12:30 pmOverview of Microsoft Promotion for NAV and GP Clients

10sep11:00 am12:00 pmConfab with Stoneridge - Livestream - Field Service Comparisons

16sep10:00 am10:30 amThe Modern Manufacturer - Product Lifecycle Management

16sep12:00 pm12:30 pmHow to Upgrade to Dynamics 365 Finance and Operations: Examining Custom Code and ISV Implications

16sep2:00 pm2:30 pmScheduling and Dispatching for the Modern Field Service Company

23sep12:00 pm1:00 pmDynamics 365 Business Central Wave 2 Release Preview - An Overview of the Most Exciting New Features Coming in October

24sep11:00 am12:00 pmConfab with Stoneridge - Livestream - The Modern Workplace: Teams, Sharepoint, Outlook, Office, and AI Integration

30sep10:00 am10:30 amThe Modern Manufacturer - Return Management

30sep12:00 pm12:30 pmEmpowering Your Field Service Technicians with a Mobile Solution

october

07oct12:00 pm1:00 pmThe Three Paths to Business Central from Dynamics GP

08oct11:00 am12:00 pmConfab with Stoneridge - Livestream - The Vision and Strategy of Microsoft Business Systems

14oct10:00 am10:30 amThe Modern Manufacturer - Complex Cost Modeling

14oct12:00 pm12:30 pmGenerating Custom Inspection or Process Forms

19octAll Day22Stoneridge Connect Fall 2020

22oct11:00 am12:00 pmConfab with Stoneridge - Livestream - Stoneridge Connect Recap

28oct10:00 am10:30 amThe Modern Manufacturer - Engineering Change Orders

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