Hello !
I've got hardware informations about ESXi host (such as CPU, disk, etc)
taht I want to retrieve outside of a vCenter/ESXi for an external monitoring system.
I've saw really really slighty that it would be possible throught Powershell...
Thanks for your help !
Hello,
the link i have commented, explian how to monitor ESXi hardware status using the CIM cmdlets of powershell 3.0.
Not virtual machines ![]()
Do you want this, right? ![]()
Check this code taken from the link, you should notice that connects to an esxi host, not virtual machines:
import-module CimCmdlets |
2 | $ipaddress = "10.20.177.15" |
3 | $HostUsername = "root" |
4 | $CIOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl |
5 | $Session = New-CimSession -Authentication Basic -Credential $HostUsername -ComputerName $Ipaddress -port 443 -SessionOption $CIOpt |
6 | Get-CimInstance -CimSession $Session -ClassName CIM_Fan |
Best regards,
Pablo
You can certainly get this information with PowerShell, please confirm exactly what information you want and the format (I'm assuming CSV).
Cheers,
Jon
This should help you Monitoring ESX hardware with PowerShell | VMware PowerCLI Blog - VMware Blogs
Hi Jon,
Thanks for your reply.
I want to retreive more of all state of Hard drives (OK or KO, pe, if a disk failed to replace it as soon as possible).
Thank you Mustafa,
I'll have a look on this way than come back in case of any question ![]()
Hello,
i would recommend you to check this:
http://www.virtu-al.net/2012/10/29/using-powershell-v3-0-cim-cmdlets-with-vmware-esxi-hosts/
Best regards,
Pablo
Here I've tryed with "Get-HardDisk" after been connected to my ESXi host,
but it's only for virtual machines ?
Or is there a way to check up the physical drives (and not virtuals) ?
Have you tried below command to get the Physical HDD details
I can not connect to ESXi host this way, Haven't got the "Connect-VIServer" commands.
Had tryed with "Connect-WSMan" too but it can not find the esxi host again ![]()
I've also tryed the script you gave me,
it returns me the "FAN speed" and "ambient temp" than only errors saying that class "XXX" is unfindable
Hello,
the link i have commented, explian how to monitor ESXi hardware status using the CIM cmdlets of powershell 3.0.
Not virtual machines ![]()
Do you want this, right? ![]()
Check this code taken from the link, you should notice that connects to an esxi host, not virtual machines:
import-module CimCmdlets |
2 | $ipaddress = "10.20.177.15" |
3 | $HostUsername = "root" |
4 | $CIOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl |
5 | $Session = New-CimSession -Authentication Basic -Credential $HostUsername -ComputerName $Ipaddress -port 443 -SessionOption $CIOpt |
6 | Get-CimInstance -CimSession $Session -ClassName CIM_Fan |
Best regards,
Pablo
Hey Pablo !
Yes, that's right ![]()
But even PowerShell or PowerCLI doesn't find module "CimCmdlets" ![]()
