Jump to content


anyweb

Using remediation scripts in Intune to grab Windows 365 health check logs

Recommended Posts

Introduction

In a previous post we took a look at how you can determine the health of the Windows app and you can read about that here. Please read it to understand the new feature and why this blog post improves things from an admin perspective.

In this blog post myself and my good friend Paul Winstanley took a look at yet another Windows 365 related ability and that is an Intune remediation solution called Windows App Health Check Log Reader.

Note: This remediation solution is not supported by Microsoft.

If your Windows app detects a health issue it’s logged in the following log file:

C\Users\<USERNAME>\AppData\Local\Temp\DiagOutputDir\Windows365\logs\health_checks.log

But that log file is on the device hosting the Windows app used to connect to your Windows 365 Cloud PC’s and that requires remote access by an admin or some other way of grabbing the log to determine the issue.

In this blog post we take a look at a remedition solution which does just that, it looks at  Windows devices that you target, determines if they have the Windows app installed and if that app matches a minimum version (needed for health checks), parses the health_checks.log file to see if there were any recent errors reported.

If so, based on the cadence you select, it will copy that log to the root of your Intune logs folder, which is located at the following path:

C:\ProgramData\Microsoft\IntuneManagementExtension\Logs

Doing this allows you to grab the logs via the Intune console collect diagnostics ability. So let’s take a look at how it works.

Get the scripts

Head over to Github and download the 2 scripts here. They’ve changed a bit lately based on feedback we submitted, so do check regularly for updates.

Once you’ve downloaded the scripts, extract them somewhere useful.

health-check-remediation-scripts.png

Create the remediation

In Microsoft Intune, create a remediation solution using these 2 scripts.

create-remediation.png

On the Settings page, point it to the 2 scripts as appropriate.

create-remediation-add-scripts.png

Once done, assign it to some devices that you want to monitor the health of the Windows app on, we used an Entra Id group containing some devices with and without the Windows app installed and we set a cadence of every hour to see the results quickly, however in production you’ll probably want to set that to run once a day.

assignments.png

Analyzing the results

After the remediation has run for some time, you can analyze the data it created by clicking on Device status in the remediation.

device-status.png

In here we can see that most devices are without issues (good) but one device reports a detection status of With issues and it has recurred.

with-issues.png

Back in the Intune console, locate the device highlighted with issues, and click on the Collect diagnostics button.

collect-diagnostics.png

answer Yes when prompted.

yes.png

After some time those log files will be captured and you’ll see the status has changed.

collect-diagnostics-completed.png

Click on Device diagnostics to download those files, by clicking the three dots and then selecting download.

download.png

Within the extracted ZIP file, locate the (67) FoldersFiles ProgramData_Microsoft_IntuneManagementExtension_Logs folder and you’ll see the health_checks.log file.

67-folder.png

Open that file in CMTrace to review the issue.

failed-internet-connectivity.png

That’s a result!

With this new remediation solution, you (as an Intune admin) can automate the copying of the health_checks.log file to a location that is easy to remotely grab without needing to bother the end user or use remote access to their PC.

Awesome.

see you in the next one !

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.