2 Replies Latest reply on Feb 21, 2020 8:04 AM by ranjithbabhu

    PowerCLI command to check the module details

    ranjithbabhu Novice

      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.

        • 1. Re: PowerCLI command to check the module details
          LucD Guru
          User ModeratorsCommunity WarriorsvExpert

          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

          }

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: PowerCLI command to check the module details
            ranjithbabhu Novice

            Works Awesome, Thanks LucD.