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. This was a very popular post so I updated the code to add some new features and to give more information to the end user.
So let’s take a look at the changes.
New reset option
In the new version (version .003) there’s an additional reset option called Refresh, it’s based on the doWipePersistUserData option here and this allows user account and data to be retained during the reset.
In addition, I’ve added approximate estimations of how long each reset will take (I might adjust these later on with better estimations), this gives the end user a good idea of which option might be best for them.
Tooltips
I’ve added tooltips throughout the tool so if you hover the mouse over an option you’ll get details about what it offers.
You can customize the content of the tooltips in this section of the reset-windows.ps1 PowerShell script.
Updated messages
I’ve modified the messages to make them clearer to the end user. Below is one example.
Check for Power
The script now checks if a power source is connected, and prompts the end user to connect power if not. This check will only occur if the computer is not a virtual machine.
Testing the script
To test the script, you can use psexec to launch a cmd prompt in SYSTEM context. After doing that, you can launch the reset-windows.ps1 PowerShell script to see how it works after your changes.
psexec /i /s cmd.exe
You can read the rest of this blog post over at windows-noob.com here.