Automation

 View Only
  • 1.  PowerCLI command to check the module details

    Posted Feb 21, 2020 11:01 AM

    Need to get the Native driver status using "esxcli system module list | grep qfle3f" for all the ESXi host in a cluster. Disabled qfle3f driver for all the server but need to get the status. logging in each server and getting status is painfull. only for ProLiant BL460c Gen9 and ProLiant BL460c Gen10 servers. Anyone can help me here.



  • 2.  RE: PowerCLI command to check the module details
    Best Answer

    Posted Feb 21, 2020 11:15 AM

    Start with something like this

    $clusterName = 'cluster'

    Get-Cluster -Name $clusterName | Get-VMHost |

    ForEach-Object -Process {

        $esxcli = Get-EsxCli -VMHost $_ -V2

        $esxcli.system.module.list.Invoke() |

        where{$_.Name -match "qfle3f"} |

        Select @{N='VMHost';E={$esxcli.VMHost.Name}},

            Name,IsLoaded,IsEnabled

    }

    To limit to specific HW models you can filter the Get-VMHost with a Where-clause.

    Since I don't have access to that type of HW, you would need to find the values with a Get-VMHost.
    You could that with

    Get-VMHost | Select Name,Model

    The concept would work like this.

    $clusterName = 'cluster'

    $modelName = '<targetted-model>'


    Get-Cluster -Name $clusterName | Get-VMHost |

    where{$_.Model -eq $modelName} |

    ForEach-Object -Process {

        $esxcli = Get-EsxCli -VMHost $_ -V2

        $esxcli.system.module.list.Invoke() |

        where{$_.Name -match "qfle3f"} |

        Select @{N='VMHost';E={$esxcli.VMHost.Name}},

            Name,IsLoaded,IsEnabled

    }



  • 3.  RE: PowerCLI command to check the module details

    Posted Feb 21, 2020 04:03 PM

    Works Awesome, Thanks LucD.