Wednesday, June 20, 2018

How to calculate a sum in a repeat row in WFA

Ever needed to add a repeat row and calculate a sum on the fly ?
This is built into wfa already.

For example, you want a user input table, where you add qtrees and their sizes, but you would need a sum at some point so create the volume (where the size is the sum of the qtrees).

Monday, June 18, 2018

Wfa Invoke-NcSsh broken

In WFA4.2 you might have noticed Invoke-NcSsh doesn't work as it used to.  You need putty, and even then there seems to be a memory leak.

WFA has a custom cmdlet called "Invoke-WfaClusterCli", which is
doing the same thing, assuming you wanted to SSH to a Netapp Cluster ofcourse :)

I posted the code below, just for reference.  Obviously in WFA you can just call it, as it's embedded in the WFAWrapper module.

Tuesday, June 5, 2018

Powershell - move ontap cluster lifs between interfacegroups

For a headswap procedure, I had to move lifs from 3 interface groups to 2 interface groups.

So before we had :
a0a, a0b & a0c

After we have :
a0a, a0b

This means all lifs on a0c need to move to a similar vlan port on another interface group.  here is a powershell script to do it automatically

Monday, June 4, 2018

WFA advanced incremental naming

In a previous post, I already explained how incremental naming works.  (http://www.wfaguy.com/2016/12/incremental-naming.html#more)

However, sometimes you need something a bit more advanced.
For example you need this incremental functionality

- myvol50xx
- myvol51yy
- myvol52zz

Wednesday, May 30, 2018

WFA Fixes for vmware 6.5

The Vmware 6.0/6.5 packs from the automation store are unfortunately not 100% failsafe, I discovered today.

These are the fixes I added to make it work with Vmware 6.5.
I have NOT tested it with 6.0, maybe the fix is only needed for 6.5.

I also talked to engineering, if they adapt my fixes, I'll update this post to not add any confusion.



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.