WFA command for querying Active Directory user groups

Below is the source code of a OnCommand Workflow Automation command that searches the Active Directory for a specific user group.

Input from the Workflow should be: DOMAIN\usergroup
Output would be: found or not found with error (Workflow should be stopped)
Installation: Just add a new command to WFA and copy/paste the below source code into the code window. Additionally install the Windows Feature “Active Directory module for Windows PowerShell” onto the WFA Server.

param (
[parameter(Mandatory=$true, HelpMessage=”AD group to check for”)]
[string]$ADgroup

)

Get-WFALogger -Info -message $(“Checking for AD group ” + $ADgroup)

$pos = $ADgroup.IndexOf(“\”)
$groupname = $ADgroup.Substring($pos+1)

# Get the latest job which moves the specified volume to the specified aggregate
$result = get-adgroup -Filter {SamAccountName -eq $groupname}

if(!$result)
{
Get-WFALogger -Info -message $(“Specified AD group was not found”)
Set-WfaCommandProgress -Total 1 -Current 0 -ProgressPercentage 100 -Note “AD group was not found”
throw “Failed to find AD group ‘” + $ADgroup + “‘”
}
else
{
Get-WFALogger -Info -message $(“Found specified AD group”)

Set-WfaCommandProgress -Total 1 -Current 1 -ProgressPercentage 100
}

Script: Direct-SVM support for SnapVault in VSC

Attached is a script to do SnapVault (SnapMirror XDP) with Virtual Storage Console for VMWare from NetApp without adding the whole cluster into the VSC GUI.

VSC_Add_job

VSC 5.0 added support for SnapVault into the VSC for VMWare. If you want to use this function you had to add the whole destination cluster into the VSC. There is no possiblity to add only the SVM via a management interface into VSC and use SnapVault and SnapMirror.
I normally don’t add the whole cluster because of the permissions.

The second reason was VSC 4.2.x hadn’t support for SnapVault updates.

The best solution was to create a script which handles these problems and adds the capability to update SnapVault to SnapMirror cascades. It was tested with a number of different VSC versions including 4.2.1, 4.2.2, 6.0 and 6.1 and OnTap 8.2.x to 8.3.x.

I named the script SVVMcDOT -> SnapVault for VMWare with cDOT.
Along with the script you can find a little manual and the configuration file attached. Just rename the svvmcdot.doc to svvmcdot.ps1 (PowerShell Script), the configuration file from svvmcdot_config.doc to svvmcdot.conf and read the documentation.

svvmcdot_config
svvmcdot
Documentation_svvmcdot_v1.0

More Infos:
https://community.netapp.com/t5/VMware-Solutions-Discussions/VSC-4-2-1-and-Clustered-Data-OnTap-SnapMirror/m-p/64113/highlight/true#M6005