Thursday, May 17, 2018

Invoke WFA workflow with PowerShell

It was brought to my attention that I never really posted the Powershell code to invoke a workflow.  It seemed so elementary, and I tend to use it in many scripts, that I simply forgot.

So here are  2 simple functions to list workflows and to invoke a workflow.


Wednesday, March 28, 2018

WFA sub-workflow runner template (parallel workflows)

Invoking a workflow in a workflow.  It's been done before.  Of course we can have subworkflows (1 level deep).
But I'm talking about invoking a loop-back (localhost) rest-call.

When done in the traditional way, usually for something simple like the default "acquire datasource" workflow, it's something like : invoke-rest - wait - check result.

Maybe even with a repeat-row, like Tim Kleingeld did with his lun migrations a few years back.

If we mean serious business, we need something more solid, more thought-through.

WFA handling passwords as userinput

Although WFA has a credential repository, sometimes it is still needed to prompt an operator for a password.

In that case, it's best it is protected and no-where to be found in the logs.

WFA has this feature and here is a step-by-step tutorial on how it works.

Monday, March 26, 2018

Run PowerShell scripts in parallel

PowerShell is awesome, and you can do many things with it.  But a PowerShell script is ran synchronously.  That means that it will just execute one line after the other.  For many purposes, that's just fine.  However, if you want to process thousands of objects, latency issue might kick in.

For example : you want to collect information from a 1000 servers and the script runs for 2 minutes per server, then your script will run for more than a day.

If we could however process multiple servers at the same time, that would drastically reduce the overall process time.

In this example I'm processing and merging more than a 1000 csv files into 1 csv-file (All that in a few seconds, and I have manually added a fake latency of half a second per csv-file !

Thursday, March 15, 2018

Error : Parameter Type 'ActionPreference' is not supported.


If you create a new command and you press the button "discover parameters", you might get the error "Parameter Type 'ActionPreference' is not supported".

Don't panic, there is an easy fix.

Thursday, March 1, 2018

Convert ALL snapmirror DP relations to XDP with WFA



I was asked to automate the conversion of all snapmirror relations from DP to XDP.
So here is a workflow (version 4.1) that should work as an example.

It asks for the new mirror-vault snapmirror policy name and lists your snapmirror relations (all of them)

Tuesday, February 27, 2018

WFA 4.2 has gone GA

OnCommand Workflow Automation 4.2 GA has been posted to the NSS Site.

Workflow Automation 4.2GA includes the following features and enhancements:

Tuesday, February 13, 2018

WFA - Replace the SSL Certificate

In WFA you probably use https, and if you are a good sysadmin, you replace the SSL certificate.

I took me quite some time to replace my certificate with my "wildcard certificate" I use in my lab-environment.

Here is how I did it.

Saturday, February 10, 2018

Wfa - Execute MySql NonQuery PowerShell function

You may or may not know that WFA, when coding in PowerShell, comes with the CmdLet "Invoke-MySqlQuery" (aliased as imysql for the gurus).

The cmdlet comes in handy very often but is built for "QueryCommands".
What I mean by that is that it assumes that your Query will return "Records".

But what if you want to execute an insert, update or delete statement ?

Tuesday, February 6, 2018

WFA maintenance workflow (powershell only)

If you are working with WFA quite a lot, there are some maintenance tasks that might be handy.  And they are either not possible in the GUI, or they take a lot of manual work.

  • Clean ALL execution logs
  • Clean ALL reservations
  • Enable Full RBAC
here is a workflow to do this...