The 2011 Scripting Games Advanced Event 8: Use PowerShell to Remove Metadata and Resize Images


2011 Scripting Games badge

Summary: Advanced Event 8 in 2011 Scripting Games uses Windows PowerShell to remove metadata from image files and to resize those images.

About this event



Date of Event

4/13/2011 12:15 AM

Due Date

4/20/2011 12:15 AM

Event scenario

You have a number of pictures stored in a series of folders. Some of the images have a lot of metadata associated with them, others do not. You are planning to share some of the pictures with friends, but because the images are extremely large, you need to resize them to a size that is suitable for email. You would like to be able to remove all metadata from files that you want to share. You decide to create a script that will show a graphical interface displaying a picture on one side and the metadata associated with the picture on the other side. The graphical interface should also contain a button that is named something like Prepare to share. When clicked, this button will resize the image, remove all of the metadata associated with the file, and save the new file under a new name that prepends the word SHARE and an underscore in this fashion: SHARE_originalfilename.

Design points

  • You are free to use existing modules, controls, and so on that are freely available; however, you cannot provide a solution that requires commercial non-Microsoft software. But if you take an external dependency in your solution you MUST check for this requirement in your script.
  • You are free to use any approach you wish to create your graphical solution.
  • Extra points for offering to automatically download and install any external dependencies.
  • Your solution should allow the user to set the initial folder to gather the images.
  • Your solution should allow the user to set a different folder to save the SHARE_ images.
  • Extra points for adding a graphical folder picker to allow the user to select the initial folder.
  • Extra points for remembering configuration preferences.
  • Extra points for allowing the user to easily process all of the files in the initial folder.

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.

Ed Wilson, Microsoft Scripting Guy


Comments are closed. Login to edit/delete your existing comments