LucD
Leadership
Leadership

Ok, just looked closer at your script.
You have to provide the parameter to the get command in a hash table.
Like this

Foreach ($VMHost in Get-VMHost ) {

    $ESXCli = Get-EsxCli -VMHost $VMHost -V2
    $ESXCli.system.module.list.Invoke() | ForEach-Object {
        $ESXCli.system.module.get.Invoke(@{module=$_.Name}) | 
        Select-Object @{N="VMHost";E={$VMHost}}, 
            Module, License, Modulefile, Version, SignedStatus, SignatureDigest, SignatureFingerPrint
    }
}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference