VMware Cloud Community
ranjithbabhu
Enthusiast
Enthusiast
Jump to solution

PowerCLI command to check the module details

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 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

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: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

ranjithbabhu
Enthusiast
Enthusiast
Jump to solution

Works Awesome, Thanks LucD.

Reply
0 Kudos