Call K2 blackpearl SmartObject with PowerShell

Markus Kolbeck
Markus' Blog
Published in
1 min readMay 3, 2017

Calling K2 blackpearl SmartObject within your custom .net code is pretty well documented.
If you ever wondered how to call a SmartObject from PowerShell, you can use the following code example as a baseline.

When running the script, you have two choices:
1. you can run the script locally on a machine, where the K2 assemblies are registered (e.g. on the K2 Server itself)
2. you can execute the script remotely from any machine and target it to the K2 Server using the Invoke-Command cmdlet

Therefore you will have to save the PowerShell script and then use the following command to execute it remotely:

Invoke-Command -ComputerName YOUR_K2Server -FilePath C:\temp\ExecuteSMO.ps1

--

--