Thursday, January 25, 2018

Advanced SQL queries in WFA Filters

[Article from Christian Bauernfeind]

In a workflow we built recently, we needed to know the combined size of all LUNs in a given volume.  The SQL to calculate that number is fairly straightforward:

SELECT,SUM (lun.size_mb)
FROM cm_storage.volume JOIN cm_storage.lun ON lun.volume_id =
GROUP BY lun.volume_id

However, how can we return this information.  And why would this even be a big deal ?

To answer this question in detail, you should first understand how WFA filters work.

How to protect all categories in bulk

WFA comes with a Cdot pack that contains a bunch of demo workflows.  You can hide them in the portal by going to "administration - WFA configuration - Advanced - show workflows" and then uncheck the packs you don't want to see.

However, from the rest API, these workflows are still visible.  If you truly want to hide them, you should add every workflow to a category and then restrict every category.

Wednesday, January 17, 2018

WFA No snap-ins have been registered for Windows PowerShell version 5

This is around for a while, but still not fixed apparently.

Problem :
if you want Vcenter integration with WFA and you installed the latest Vmware PowerCLI. You will get the error "No snap-ins have been registered for Windows PowerShell version 5".

Explanation :
Vmware (finally) changed their PowerCli names to "module" instead of the old "snapin". In WFA however, we are still looking for "snapin".

Easy fix :
Just goto the WFA install folder, under /posh/ you will find a WFAWrapper.ps1. Do a search replace of the word "snapin" with "module" and the problem will be fixed.