Gathering logs and sending an email when you need to reset Windows Autopilot – part 3

Introduction

In a previous blog post I explained how you could use the SendGrid resource in Azure to send emails, and with a PowerShell script create an Intune app to give end users additional options when resetting their Windows Autopilot provisioned pc. This app would gather the Autopilot diagnostic logs (and other relevant logs) and send an email to your support inbox prior to resetting the pc.

I’ve now updated the code quite a few times with the following changes.

  • modified text boxes to ‘read’ better
  • modified warnings to make it clear when a device might become unbootable
  • added visual clues (traffic lights) to show which method is recommended
  • changed the default method to Wipe
  • added code to check for missing WindowsRE environment and to attempt to repair it if missing
  • modified reg keys so you can reinstall from the company portal if you click cancel
  • bug fixes

Well that’s it, so let’s take a look at some of the changes.

When it launches, by default the Wipe method is highlighted with a Green traffic light. This is the recommended Windows reset option for most users.

image.png

the Refresh option is shown as follows…

image.png

and the Secure Wipe option is shown with a red stop light, this visual clue should hopefully get the users to think before continuing with this method…

image.png

If the user hovers over a method they’ll get tooltips about what it does

image.png

And if they decide to continue they’ll get more info about the possible choice made (it’s a dynamic message)

 

image.png

If the user proceeds with the reset then the Windows Autopilot (and other related logs) are gathered, zipped up and emailed to your inbox, and other actions can be taken within the reset-windows.ps1 script, such as a payload of your choice (hint: remove device from an azure ad group) before finally resetting Windows using the method you specified.

that’s it ! please test this new release and give me your feedback

for instructions to set this up, use the new scripts in this blog post but see how here.

Downloads

You can download the new solution here

Note: You must login as a member or windows-noob.com to download scripts from that link.

cheers

niall

This entry was posted in AzureAD, httptrigger, troubleshooting, Windows AutoPilot. Bookmark the permalink.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.