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.

3 comments :

  1. # load VMware module
    try
    {
    if (!(Get-Module -Name VMware.VimAutomation.Core))
    {
    Get-WFALogger -Info -message $("Trying to add PS Module for VMware")
    Import-Module -Name VMware.VimAutomation.Core -ErrorAction Stop
    }
    }
    catch
    {
    Get-WFALogger -Error -message $("FAILED to load PS Module for VMware")
    Throw "Unable to load VMware Powershell Module"
    }

    ReplyDelete
  2. Hi....I am trying to create customized Workflow to create a Volume and cifs share where the customer wants me to have the user give the cifs share name and it can generate the default naming convention of the volume name. Can you please provide a script that can the following?

    ReplyDelete