Hello there,
I was wondering if someone have used PowerCLI to export the Hardware Status xml information for a host in vCenter?
I'm not really familiar with PowerShell or PowerCLI so I'm not sure if this is even possible but it would help us fully automate some third party driver checking.
Thank you for your time and help
Matt
You can check the driver versions while connected to a Host without need for an XML export.
I have attached a quick and dirty script to write the versions of all drivers to the console.
Main points of the script:
Connect-VIServer --- Connect to vCenter
Get-VMHost --- Lists Hosts associated with the vCenter
Get-EsxCli --- Access to ESX Host's CLI
$EsxCli.system.module.get("$DRIVER_NAME") --- Retrieves the VMKernel module (if the system knows about it) by name
This is just the fastest way to show how to get driver information. Basically you just connect to the vCenter Server via PowerCLI, then connect to Hosts one by one. While connected to a Host, use EsxCli to get the driver (module) information.
I also forgot to add a line at the end of the script, so here it is: "$DISCONNECT = Disconnect-VIServer $VCENTER_SERVER -Force -Confirm:$FALSE"
---Ryan D. King
Not sure if this can help you out . but give it a try.
https://www.packtpub.com/books/content/inventorying-servers-powershell
You can check the driver versions while connected to a Host without need for an XML export.
I have attached a quick and dirty script to write the versions of all drivers to the console.
Main points of the script:
Connect-VIServer --- Connect to vCenter
Get-VMHost --- Lists Hosts associated with the vCenter
Get-EsxCli --- Access to ESX Host's CLI
$EsxCli.system.module.get("$DRIVER_NAME") --- Retrieves the VMKernel module (if the system knows about it) by name
This is just the fastest way to show how to get driver information. Basically you just connect to the vCenter Server via PowerCLI, then connect to Hosts one by one. While connected to a Host, use EsxCli to get the driver (module) information.
I also forgot to add a line at the end of the script, so here it is: "$DISCONNECT = Disconnect-VIServer $VCENTER_SERVER -Force -Confirm:$FALSE"
---Ryan D. King
Good article on CIM Sessions, but didn't work for me. Tried CIM sessions to the ESX Hosts unsuccessfully. Found another way to get the driver information that doesn't require an XML export (from vSphere Web Client). You can use EsxCli to get the driver info. Posted my findings and a sample script on this thread.