Windows Autopilot

Another new Get-AutopilotESPStatus script posted

Building on top of the script that I blogged about just over a month ago (time flies), I’ve now posted a new version.  A few changes this time around:

  • Apparently the MSI product ID for the Intune Management Extensions changed, so I updated the script to know about the new ID.  (I hope it doesn’t do this frequently.)
  • I added a new -AllSessions switch, which is off by default.  This causes the script to only output the last ESP session information, as some people were confused by the multiple sessions.  It’s the last one that is the most important, the previous ones are just interim statuses (e.g. what was the state just before that reboot).  If you want to see them all, add the switch.
  • I added some logic to look up the exit code for Win32 apps installed by the Intune Management Extensions.  This only works right now for device-targeted apps, at least until I figure out how to translate a SID into the corresponding AAD user GUID.

The end result is a (normally) shorter list, with a little more information in the case of Win32 device app failures.


Categories: Windows Autopilot

2 replies »

  1. I’ve noticed that the Intune graph module, and therefore this script, doesn’t seem to work in powershell 7. I assume the module needs an update.

    Connect-MSGraph: Could not load type ‘System.Security.Cryptography.SHA256Cng’ from assembly ‘System.Core, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’.