Workflow Script in PowerShell Module

In the last MVP retreat I have learned about the new PowerShell module introduced by Peter Kjaer.  Since I attended that program I was planning to spread it in the community and also contribute more on that module.


I discussed with Peter and Alvin regarding the use cases and came up with a new script for workflow.

 

 

Link for this Script –

You can download the latest version of the script from the following url – https://github.com/pkjaer/tridion-powershell-modules

This project contains Windows PowerShell modules that allow you to interact with the SDL Tridion Site content management system and perform various administrative tasks.

You can find more details here. https://github.com/pkjaer/tridion-powershell-modules/wiki

Functionality-

Using this script you can easily retrieve the list of workflows from Tridion Content Manager, optionally filtered by Status or Assigned Trustee–

For example

To retrieve the list of all (Active + Historical) workflow items use below command -

Get-TridionWorkflowItem

Whereas to filter item by status you can use –

Get-TridionWorkflowItem –Status Active (Returns a list of all currently active workflow items)

Get-TridionWorkflowItem –Status Historical (Returns a list of all historical (archived) workflow items.)

As I mentioned earlier, anyone can also filter the workflow on basis of assigned trustee as well

Here are some examples for that –

Get-TridionWorkflowItem -AssignedTo 'tcm:0-12-65552'

Or

Get-TridionWorkflowItem -AssignedTo 'DOMAIN\Name'

Even you can search for group as well.

Get-TridionWorkflowItem -AssignedTo 'Editor' -Status Active

In the above example we have combined both the filters to retrieve the list of all active workflow items assigned to the 'Editor' group.

Last but not the least-

You can also select the particular object from the output like to get a list of the ID and Title of all workflow items (past and present) assigned to any group whose name begins with 'SDL Web'.

Get-TridionWorkflowItem -AssignedTo 'SDL Web*' | Select-Object Id, Title

If you like it then use it. Also I will be very happy if you can suggest some real time use cases that you have to perform frequently as an admin.