[POWERSHELL] Extract pictures from PSR’s MHT Files

Windows 10 has a tool called PSR (Steps Recorder) that allows you to get screenshots from and steps when an issue occurs.

More info: https://support.microsoft.com/en-us/windows/record-steps-to-reproduce-a-problem-46582a9b-620f-2e36-00c9-04e25d784e47

The tool generates a ZIP file, and within that ZIP file you can find an MHTML document that you can open with IE or Microsoft Word.

Now, what if you want to extract all the pictures from that MHTML?

Here’s the script to do it:

Enjoy!