PowerShell Wizard

  • 5 January 2012
  • 6 replies
  • 4 views

Badge +10

The PowerShell wizard allows you to run PowerShell commands from your K2 process. The PowerShell commands are run on the K2 server itself. PowerShell must be installed on the K2 Server and on the K2 machine designing the K2 workflow (this is because of the assemblies required). The wizard allows users to specify input variables and output variables. With the normal Run-As feature, you can run the powershell in another users' context. Installation (if you build yourself): Build the solution i


6 replies

Badge +1

Instructions to install available here: http://old.k2underground.com/groups/powershell_wizard/default.aspx

 

The PowerShell wizard allows you to run PowerShell commands from your K2 process. The PowerShell commands are run on the K2 server itself.

PowerShell must be installed on the K2 Server and on the K2 machine designing the K2 workflow (this is because of the assemblies required).

The wizard allows users to specify input variables and output variables. With the normal Run-As feature, you can run the powershell in another users' context.

 

Installation (if you build yourself):

  1. Build the solution in DEBUG mode (it has some build events which copy assemblies)
  2. Check the changes in ConfigurationManager.config and apply them to the configurationmanager file in c:programdatasourcecodeconfigurationmanager.config
  3. Copy the CodeExtender folder (from the design project) to C:Program FilesK2 blackpearlBinDesignTemplatesCSharp; this will add some files to the folder structure.
  4. Start K2 studio and use the wizard.
  5. Start Visual Studio - Use right mouse button on the toolbox and select 'reset toolbox'

 

Installation (if you do not build yourself)

  1. Copy the SourceCode.Wizard.PowerShell.*.dll files from the bin
    elease(S) to c:programdatasourcecode
  2. Check the changes in ConfigurationManager.config and apply them to the configurationmanager file in c:programdatasourcecodeconfigurationmanager.config
  3. Copy the CodeExtender folder (from the design project) to C:Program FilesK2 blackpearlBinDesignTemplatesCSharp; this will add some files to the folder structure.
  4. Start K2 studio and use the wizard.
  5. Start Visual Studio - Use right mouse button on the toolbox and select 'reset toolbox'

Version 1.2 is released!

The V1.2 release improves the following:

  • System.Management.Automation assembly was taken from a directory on disk, this was changed when we 'added' 32-bit support and was actually wrong in the first place. Now, it takes the assembly from the GAC, where it will be located. This also means the designer tools do not need the SDK anymore.
  • Upgrade AssemblyVersion to 1.2
  • Moved the CodeExtender files into another directory as the directory name was wrong.
  • Improved icons.
  • Very simple syntax error checking was added. This will now note very simple powershell errors. Because any word (or even a single character) can be a commandlet, it's still looks very stupid if you enter "X" into the script dialog and it validates correctly.  X could be a commandlet (that you load at runtime) and can thus be valid powershell script. The script checking does however check if you had your quote's correctly etc. Powershell simply does not provide more options to do better checking.
  • Error handling at runtime has been improved a little bit.

 

Known  issues / Feature requests

See github page!

 

Feedback

Any feedback is very welcome. If you find bugs (could easily happen with my coding :-)), or have a feature request, please use the contact form!

 

GitHub

I've started a github repository for this project. The source code is also available. If you feel want to contribute, you can take a fork of the project when desired. Feel free to contribute!

 

 

Badge +1

Hi Moises

Do you know if this will work in the latest version (4.6.9)?  I am doing testing an can't get the wizard to load in K2 Studio or Visual Studio?

Thanks

Sandra

Badge +1

Hi smithssa,

 

I haven't tried yet with 4.6.9 but I'm upgrading a server now and will test it. I assume you might have to repeat the installation and configuration process.

 

Moises.

Hi Moises,

 

Did you manage to get this working with 4.6.9 in the end. Would be intrested in using. Also is there a set of updated install paths for the control dlls?

 

Many Thanks

Lee

Badge +4

Does this work in 4.6.9?  Is there an alternative if not?

Badge +8

i don't have the configurationmanger file under c:programdatasourcecode
i can see this file in here - C:Program Files (x86)K2 blackpearlConfiguration

 

??

Reply