A drag-and-drop GUI made with PowerShell

The script below shows how to create a simple WinForms GUI in PowerShell, where you can drag and drop files and folders and then process these with PowerShell commands when you click the button. I’ve pieced this together using various online source and my own trial and error, and figured it might be useful as a base for others who need to create an interface.

powershell-gui

I probably won’t win any design prices with this one :-)

Tip: If you are unsure of control names or how to use properties on a control, remember that you can always launch Visual Studio with a WinForms project and then inspect the Properties window and Form1.Designer.cs file for “inspiration”.

Here is the script (or get it at GitHub).

This entry was posted in Development, Tutorials and tagged , , , . Bookmark the permalink.

2 Responses to A drag-and-drop GUI made with PowerShell

  1. Tyler says:

    Great work! Was looking for something like this. Thanks for sharing.

  2. Hank says:

    thank you, this is awesome!

Leave a Reply

Your email address will not be published. Required fields are marked *