Saturday, September 23, 2017

PowerShell: Multiple jobs in a Windows Form

The following example demonstrates a simple method for managing multiple jobs in a form.  The example shows how the job management code can update a complex control on a per job basis.  This demo uses a DataGridView to configure and track the job.

The scripts require no external support and require PS Version 3 or later.

This link is for the PS1file:  https://1drv.ms/u/s!AjiiPtIUqzK_hbMB_r6sugB5IcRTqQ

This link is a PSF for PowerShell Studio: https://1drv.ms/u/s!AjiiPtIUqzK_hbMELfzgAvcGU0IKWw

For more information on how this works see: https://info.sapien.com/index.php/guis/gui-advanced-tips/powershell-studio-creating-responsive-forms

For more information on using PowerShell with Forms see: https://info.sapien.com/index.php/guis

4 comments:

  1. Wow! I was just looking for something like this. We’ve recently introduced DaRT into our environment as a way to access data from a bitlocker drive. As you may know, it’s manual, I’m trying to create a form that will utilize robocopy, comboboxes with user names and Target locations ( flash drive, nas shares), and a progress bar

    Is there anyway you could update the form/gui to do such things?

    The source directories will be the same for everyone

    Profile (desktop, documents, etc...)
    Folders off of the C:\
    Few other places

    ReplyDelete
    Replies
    1. Yes the form can be updated for nearly all conditions requiring multiple jobs.

      It would be easier to post in the Sapien forum ( I moderate there) and to review the Sapien documents referenced in this blog.

      Post a specific question with some basic example and we can try to assist you in creating a form as needed.

      Blogs are not good at interactive support. Forums are better.

      Post and reference this blog article.

      https://www.sapien.com/forums/viewforum.php?f=21

      If you need custom consulting I may be available but I only accept interesting and challenging requests.


      Delete
  2. Wow! I was just looking at doing something like this inside of DaRT as a way to move data from a HD that won’t boot.

    Is there a way you can update this post to reflect a more practical use?

    Combobox for different users profiles
    Combobox for different target locations (Flash drives, network shares)

    I see the target,source,name, etc hard coded, I’m looking for a more enterprise level solution

    ReplyDelete
    Replies
    1. Your questions are interesting but to general. ComboBoxes can be used to select almost any kind of data with PowerShell.

      Delete