I have a list of Powershell scripts that perform various functions im trying to see how i can create a GUI using those scripts .

Say like i have :

  1. Button 1 : Disk Cleanup
  2. Button 2 : Copy Files ( Should have a source and destination path being taken from Edit Box : meaning paths can be provided in the Text box and my scripts to take the values from that path to execute)
  3. Button 3 : Clear History

I'm trying to use the New-Object System.Windows.Forms.Button but unable to get the button to execute the script and even if it does execute first script its failing to execute second one . Has anyone implemented this type of feature earlier ?

0 Answers