ScreenMe: PowerShell tool to make screenshot under PE


In this post I will show you a little PowerShell tool I created that allows you to make a full screen screenshot tat can be used both on Windows and on Windows PE.

Some weeks ago a colleague asked me how to make screenshot with PowerShell.
This can be done easily using the class below:
[System.Windows.Forms.SystemInformation]::VirtualScreen
I won't explain in details how to proceed, because this is very well explained in this post.

After that I was thinking hey man this could be cool under WinPE to make some screenshot for instance in case of errors instead of using your phone :-)
That's why I did this tool.
You can find another cool one, using Windows Forms, from David Segura. 
In fact I finished mine then after that I found his post. 
I decided to post mine in WPF.
For now you have to copy the folder with all files, EXE, ps1...
Indeed I used the ps2exe tool to build the EXE and this one can just convert a single ps1 to EXE not a folder.
I also tested with my tool PS1 to EXE Generator but get an issue with not signed EXE.

In the next release I will add:
- Browse folder to select export path
- All included in an EXE file

How to get it ?


Prerequisites for PE
You will need to add the below feature in your boot image:
- Fix for WPF if you are using last ADK, check this post
- .NET Framework
- Windows PowerShell


How it works ?
The tool looks like as below:
1 / Click on the camera button to make a screenshot

2 / The below Window will be displayed
- If the tool is launched in WinPE, the default path will be under X:
- If the tool is launched in Windows, the default path will be under ProgramData

3 / Change the path or let it by default
4 / Click on the blue button to do the screenshot
5 / Click on the green button to cancel
6 / When you click on the blue button, the tool will be minimized
7 / Once the screenshot has been done, the tool will be displayed again
8 / The folder button in the title bar will allow you to display existing screenshots
- If explorer exists this will be displayed in explorer
- If not, this will be displayed in a command prompt

How to integrate it with MDT ?
In the below examples, we will use the tool in Windows PE.
There are different ways to use it in Windows PE

Method 1: From folder
1 / Copy the folder ScreenMe in a folder for instance Deploy folder
2 / Update your Deployment Share

Methode 2: Add extra files
1 / Do a right-click on your DeploymentShare
2 / Go to Properties
3 / Go to Windows PE
4 / Select your architecture (x86, x64 or both)

5 / Go to the Extra directory to add part
6 / Click on the Browse button
7 / Select the ScreenMe folder you have downloaded

8 / Update your Deployment Share

See here a nice post about how to add extra files
For SCCM, you can proceed as previously with extra files.

How to use it ?
In the below example the tool will be launched from a MDT deployment.
1 / Type on F8
2 / Go to the ScreenMe folder
3 / Type ScreenMe.exe
4 / Click on the camera button
5 / Select the path where you want to save your picture
6 / Click on the blue button
7 / The tool will be minimized until screenshot is done
8 / The tool will be displayed again
9 / Click on the folder button (in the title bar) to view existing screenshots


ScreenMe in action
In the below example I did a screenshot from Windows PE.
Before to run it, I did a net use to a folder located on my host computer.

Share this

Related Posts

Previous
Next Post »