Monitoring ESX hardware with PowerShell

Did you ever wonder where all the info under Health Status in VI Client comes from?


It turns out that your ESX server has a server built in to it that provides this information via a management standard called CIM, which is owned and promoted by the DMTF standards body. A lot of the information you can find in this CIM interface is also available through the VI API, but there is quite a bit that can only be found through CIM, most importantly, health status of the hardware hosting ESX. In this post we’ll go through some of the information that’s available and samples of getting at it.

When Microsoft released PowerShell v2 CTP3, they added some cmdlets that can access CIM. The implementation is very raw right now, for example the cmdlets don’t even have help. Also, getting this stuff working is a bit of a production. You need PowerShell v2 CTP3 and WinRM 2.0 CTP3. This latest version of WinRM only supports Windows 2008, Windows Vista and Windows Mojave, so you XP users are out of luck. You’ll also need to enable basic authentication.

Once you’ve got it set up, I’ve written a pretty easy advanced function that lets you take advantage of it.

This function makes it pretty easy to access ESX hardware information, as you’ll see below. All you need to do is connect to your ESX server, then run the function, supplying it a class name that you care about. You can find a complete list of classes in our documentation. Note that not all classes are available on all systems. As far as I know the only way to know for sure is to try it for yourself.

Here’s a sample script that puts this through its paces, and some screenshots of the results after I ran it against one of my ESX systems.

Let’s see it in action. First let’s check out all the numeric sensors that are on my system. The exact list of numeric sensors will vary from system to system, but common ones include fan speeds and temperature readings, as on my system.


It’s a little strange that my fan speeds are far below their normal minimum values, yet that doesn’t seem to be causing problems, the ambient temperature is far below the maximum value. Note that for some reason all the values here are multiplied by 100, and that the temperature are in Celsius (just like those snobby Europeans use). You can see all the possible values either by running the code or referring to this specific class in the documentation.

Next, let’s look at some actual health status, first taking on CPU.


So what the heck does HealthState 5 mean? Well I’m not sure, but one thing I am sure of is that the word uninscrutable is not in the DMTF’s collective vocabulary. To figure out what this mysterious 5 means, we again have to consult our trusty documentation. If we look at the HealthState entry we see rows for ValueMap and Values. All we have to do is correlate the value of 5 with the text in Values. Doing that we learn that HealthState 5 means “OK”.

This is true in general when you’re looking at health states: 5 always mean that the thing is OK. The value of 0 means that the state is unknown. This is not necessarily a problem, for example it may mean that the device in question is turned off. If you expect the thing to be on and useful, a value of 0 is a bad thing, otherwise it may not be worth worrying about. Any of the other values means you’ve got some sort of hardware problem that needs attention.

Now let’s look at my power supplies:


In this case I’ve got one power supply with health state 5 (OK) and one with state 0 (Unknown). Chances are my second power supply is not plugged in. (It’s in a datacenter far far away so I can’t check it.) In any event I’m not too worried about this Unknown value.

Let’s take a look at the health state of my storage. My ESX server has 3 disks, and as usual 5 is the best health state of all.


This next one shows that CIM can also be used to see data that’s also available through VI API. In this case I get the total amount of storage on this ESX system, which happens to be the same as the amount of storage in my local datastore.sample5

Finally, I take a look at some network stuff. In this case I look at Ethernet ports. Ethernet ports don’t have a health status, that’s reserved for the cards. But I can see the link status using CIM. In this case, vmnic0 and vmnic1 are plugged in while vmnic2 and vmnic3 are not.


I hope you found this useful, there’s a lot of really great information waiting to be discovered through the CIM interface.


180 comments have been added so far

  1. Hi,
    I’ll try this way to retreive health information from an ESXi server and it does not work. I always get an “access denied” error even if I use the root account.
    Any ideas ?

  2. Note: With PowerCLI 4.1 all the type names have changed so you will need to change: [VMware.VimAutomation.Client20.VMHostImpl[]]
    to: [VMware.VimAutomation.ViCore.Impl.V1.Inventory.VMHostImpl[]]
    I addition I also get access denied

  3. et-WSManInstance : Access is denied.
    t line:1 char:18
    Get-WSManInstance <<<< -Authentication basic -ConnectionURI $uri -Credential $credential -Enumerate -Port 443 -UseSS -SessionOption $option -ResourceURI "$baseurl/CIM_FAN" + CategoryInfo : InvalidOperation: (:) [Get-WSManInstance], UnauthorizedAccessException + FullyQualifiedErrorId : Exception,Microsoft.WSMan.Management.GetWSManInstanceCommand

  4. I found the host serial number here: OMC_UnitaryComputerSystem. Also you can get the BIOS version here: OMC_SMASHFirmwareIdentity

  5. I tried this on a 6.0 Update 2 host and got the error below. I noticed that the /wsman URI-stem is returning 501 Method Not Implemented. Is there an update to this script?

    Get-WSManInstance : The connection to the specified remote host was refused. Verify that the WS-Management service is
    running on the remote host and configured to listen for requests on the correct port and HTTP URL.
    At line:39 char:1
    + Get-WSManInstance -Authentication basic -ConnectionURI $uri -Credential $credent …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Get-WSManInstance], COMException
    + FullyQualifiedErrorId : Exception,Microsoft.WSMan.Management.GetWSManInstanceCommand

  6. You will never end up feeling bored reading the recent articles posted. Quality and creativity plays the role and it’s interesting to understand the Roku.com/link activation steps explained
    Start reading and its time to learn how to link Your Roku device

  7. For activating the channel, just acquiring the activation code is enough. Paste the link code in the http://www.Hulu.com/activate and then the channel gets activated. Refer the support page or call the support team to get your issues cleared as soon as possible. The expert panel will provide the right guidance..In case of activation error call our customer care on +1-844-581-4357

  8. Channel activation is not a tough job now, and here we recommend reading the recent blog post. It’s all about Twitch channel activation using twitch.com/activate. Guidelines are simple and easy to understand. Start reading if you are interested to know more about Twitch channel, the latest shows to stream on this channel.

  9. To activate the Twitch channel using the page, twitch.com/activate, refer the recent blog post on our webpage. Activate and stay updated to know the date and schedule of your favorite Twitch channel shows

  10. If you wish to watch Fox Nation on Roku, then you need to access the Roku channel store in the first place. The basic thing is to find the channel on the store. You must use the Roku account and login to the app. Some of the shows in this app are the Five, The ingraham angle, What made America Great and Outnumbered. The programs in this channel instigate patriotism for every American. So to activate this app, surf to Foxnation.com/activate and enter the code. Call the support panel and fix the problems you face

  11. To use Roku streaming Device user have to make the Roku Account or sign in to roku.com/link by giving the alphanumeric Roku actuation code. Roku is an entertainment stick which streams various channels, for example, amazon prime, Netflix, Hulu, ESPN all channels at one place. Steps to create online Roku account is very simple which are referenced here:

  12. search to get the guidance to process the steps on the tcl roku tv screen mirroring feature, you can get the crisp explanation of the steps on this blog. If you face the issue on enabling the screen mirroring on the Roku device , you can get the best support and steps to resolve the screen mirroring issues via this blog

  13. You will never feel bored watching the MTV channel shows such as Teen Wolf, Finding Carter, Awkward, Teen Mom and lot more
    Stay entertained and If you need any help to execute mtv.com/activate, reach out to our service provider

  14. To use Roku streaming Device user have to make the Roku Account or sign in to roku.com/link by giving the alphanumeric Roku actuation code. Roku is an entertainment stick which streams various channels, for example, amazon prime, Netflix, Hulu, ESPN all channels at one place. Steps to create online Roku account is very simple which are referenced here: Roku Tv Activation

  15. Excellent information and use full post. I felt easy to understand psvue com activateroku guidelines.. It’s rare to find such Blog post that meets the Quality standards and you have done an outstanding job

  16. Tubi TV is one of the exciting channels you could ever find on the Roku channel store. As a matter of fact, its content is well received by streaming device users and if you ever wish to activate the channel, then you can hover to the tubitv.com/activate. Enter the code and activate the platform

  17. You can always enjoy watching the CBS all access Roku and the value of the plan is about $29. In addition to this, activate the Roku streaming device and access the content. The shows in this app are sublime and the presence of exclusive programs such as Star Trek: Discovery, The PGA Championship etc have been a great influence overall. You can stream the local CBS station, CBSN, ET Live and CBS Sports HQ. In case of any queries, you can contact the support team and get the issues fixed on time!

  18. If you wish to get the activation steps for the crunchy roll channel, you need to get the help of this blog. On this blog, you can get the crunchy roll channel’s features, the activation steps of the crunchy roll channel on the Roku device. To activate the Crunchyroll Roku, you can refer to this blog for the activation steps

  19. You have done an outstanding job. Your article helped me to fix the go.roku.com/low power warning on my Roku gadget. I tried executing the instructions available on your blog post. I could fix the issue quickly. I’m expecting more articles going forward 

  20. If you are interested to activate the Crunchyroll Roku channel, let us explain the channel activation steps. Begin your search to find the channel. Movies & TV is the channel store category. Its time to collect the channel activation code and provide the code visiting the channel activation portal. To get the help and support to complete Crunchyroll roku activation, please contact our team of network support executives right away

  21. Counter- strike: Global Offensive is the reason why many users throng to see the Twitch TV Libe streaming events. It is certainly a defining experience overall and if you wish to activate the app, you will have to hover to the twitch.tv/activate code

  22. I would like to thank you for the efforts you have made in writing this post. Thanks for posting Really Such Things. I should recommend your site to my friends.It is of a great advantage to take Garmin Express.

  23. Is your Alexa device flashing yellow light continuously? Are you getting frustrated? If yes, then don’t look further than Alexa helpline. Alexa Helpline is a group of expert technicians who can fix your Alexa device in a short span of time.

  24. Is your Echo device not turning on? Are you getting frustrated and looking for someone who can fix your Echo device? If yes, then don’t look further than Echo Helpline. Echo Helpline is a group of expert technicians who can fix your Echo device in a short span of time.

  25. Don’t look further than NZhomeware if you are looking for elegant and latest designed bathroom taps! NZhomeware is one of the leading and well known company that provides you the best quality bathroom taps at very affordable price. Here you will find a wide range of beautiful taps and other bathroom products. Contact us now!

  26. Unable to fix Kindle won’t connect to wifi error? No problem! Get the best solution from our skilled technicians. Our techies are very experienced in resolving kindle errors and they will resolve this error within minimum time. To know more check out our website Ebook Helpline.

  27. Can you guide me, how can I update my system drivers. I am protective for my system, Every month i scan my PC for checkout viruses or also use Virtual Private Network [ https://www.vpnblade.com/ ] when i use the system. But now my system speed is going down because I have never updated my window and drivers. Can you guide me in this situation?

  28. If your Echo does not respond when you give command to it, then you need an expert technician who can fix your Echo device permanently. Echo Helpline is a well-known company that can help you with the best troubleshooting and repair service at a very affordable price. http://echohelpline.com

  29. Better shower heads can make your bath very comfortable. So are you thinking of upgrade of your old shower heads with the new one? If yes, then don’t look further than NZHomeware. We provide you a wide range of bathroom accessories like, taps, tapware, shower, shower heads, toilets and sinks etc. For more information, visit our website now! https://www.nzhomeware.co.nz/mirror

  30. Serum Crack is a news editor with many new professional functions. So, It is used to edit and create the wavetable according to our requirements. In the same way, It allows us to add audio to create a new wave-table. Anybody who knows about music creation and such software surely knows about LFO tools the same serum creates these tools. Xfer Serum Keygen is beneficial for edit and alternate wave-table with changing frequencies and sounds. This software is for both windows and mac users. It gives us a lot of advanced tools and functions to create the best wavetable. It is also so easy to use; nobody needs to be an expert to run this software. Like, Xfer serum is very used full and safe software because spyware or malware could not hit it.

  31. Firearms have turned out to be the most critical resource. Ever since COVID-19 arrived, it has been chaos all over the place.It can be used to fire the projectiles at high speed. Some scenarios might be rare, but you can find weapons for that too.Guns are a top priority when it comes to home defense. Several people have bought rifles and pistols for their cause.Custom Firearms is all about your creativity. It creates an authentic identity. In the case of guns, Looks matter as well.Some dudes love to apply Cerakote, and that’s always fine.

  32. Adobe Photoshop is the most effective and most remarkable picture editors on the lookout. It is a picture manager that is furnished with cutting edge includes that can incorporate carter of a wide scope of specialists and imaginative experts .it is a little tool stash that contains all the require for altering. It has an immense scope of photograph altering instruments.

  33. Kids love watching Cartoon network channel. If you have kids at home, activate the Cartoon network channel to educate and entertain your Kids. You can pick the most entertaining shows such as Arthur, Summer camp Island, DC superhero girls, Victor and Valentino, Teen Titans Go, Ben 10, Infinity train, and much more. It’s easy to activate the Cartoon Network channel. You can visit the store, add the channel and start collecting the channel activation code. This code must be provided on the channel activation page, cartoon network-com/activate.

  34. In the list of the best guns to buy, the ATI GSG 1911 seems to be a perfect weapon. The gun was made in Germany and arrived with a 10 round magazine. The SIG P320 M17 is a type of the P320. Yes, it’s an exceptional weapon. Other than this, the Glock 19 is the finest gun ever. It has appeared in a lot of movies. But that isn’t the only reason. The weapon is good in terms of reliability, and what else do you even expect in the first place. It has also become one of the best guns to buy in the USA.

  35. Activating the Telemundo com/activate channel seems to be a no-brainer. All you need is to visit the Roku channel store and find out where this platform. Use the remote and enter the keyword. Click the Ok button, and you’ll find a lot of apps appearing on the screen. Pick out the right one and see the add channel option underneath it. Choose the tab, and the platform will get added in some time. Then make sure that your account has authorized the action. Now it’s time for activation. Take out your mobile phone and then surf to Telemundo com/activate. Here you need to enter the activation code. Finally, the platform will get activated.

  36. The Only channel that does not require any parental controls, offering full-time family-friendly content. That feels really good. Firstly google for Frndly TV and sign up. To get frndly TV on Roku, go to your channel store and add the channel. Finally, log in with your account and start streaming.

  37. Voicemod Pro Crack can voice changing on Skype, Facebook, Twitter, and messenger. Also, It is a perfect online player in games and software. So, you can see in VR chat and others like skype. Voicemod is an online chat to wins and reverses switch that allows it to open.

  38. It’s Interesting to read your article. I’m a big fan of your blog post
    Read our article with the title “Boomerang on Roku” guide. You could understand the activation steps easily. Let me share our post with the readers who do not know how to activate the Boomerang Channel. Get help to subscribe the Boomerang package by contacting our team of customer support executives Call Us@+1-820-300-0440.

    Expecting more creative blogs going forward. Also, I’m excited to know more about your profile.

  39. It’s Interesting to read your article thats so good and informative. I’m a big fan of your blog post pleas keep it up to write more blogs and articles like that any one can watch all type of Animes on our web with out any adds on our portal on

  40. Good job. Its very excellent blog. I like it.This site have different software articles which appears to be a useful and valuable for you individual, proficient software installation. This is where you can get helps for any software installation, usage and cracked.

  41. Zebra VST Crack is a very handy sound-design playground. Moreover, the tool is very powerful. Also, it gives you a top-quality sound engine. The software consists of several sound sculpting tools and functions. Likewise, the program is capable of an unlimited range of new sounds and textures. Next, the application is very popular among professional composers, producers, and sound designers. More, this tool has all the basic functions you need to create songs. This application is suitable for our wireless modular synthesizer. Next, the tool combines numerous syntheses with a powerful modulation engine. Furthermore, the application enables you to create any additive. So, you can also add or insert a vast range of spectral effects. Moreover, this tool is also vital for you to use the whole sound as a modulator for an FM oscillator. So, whole generator modules, signal paths, and effects are stereo.
    U-he-zebra crack

  42. It’s great to have you here. I really like the colours and theme.
    Is this your website? I’d like to start working on my project as soon as possible.
    If you don’t mind, I was curious to know where you got this or what theme you’re using.
    Thank you.

    HowToCrack Download

  43. What is the first thing you think concerning a graphics design app? Perhaps Adobe Illustrator or any other application would be. These applications, nevertheless, need money to get all of their premium features that might matter in the long term. Thus, is there some other tool a designer might benefit from? Yes, Canva Mod apk for Android is the finest design application. Because Canva Pro Crack enables users to publish in the blink of an eye all their efforts. So, everyone can also produce a host of different designs, from billboards and banners to brochures and business cards. Moreover, there is nothing from your creative skills when you get the amazing mobile design app Canva Pro Crack Mod Apk the exact as Intro Maker Mod Apk.
    Canva Pro Crack

  44. Dr.Fone Crack
    Dr. Fone Toolkit is a wonderful software program that helps you to recover your deleted or erase data and info. So, it helps you to recover lost files and information from your iOS device.

  45. Are you looking for the Best Paints, Coatings, and Raw materials for automotive & industrial applications? PPC is one of the leading paints and coatings suppliers In Dubai. If you want to order a genuine product then order from PPC Store you will get 100% original product. For more information, you can even visit our website.


  46. I have to say I am impressed. I rarely come across such an informative and interesting blog, and let me tell you that you nailed it. You have given me the joy of information as well as entertainment. I’m so glad I found myself in this quest for something about that.

  47. FL Studio Mobile Apk is the most leading software for diverse innovative and expert artists to generate notable output audio files. The modern-day version must paintings exceptional. VST software program documents can be installed anywhere at a difficult power…

  48. Hey, do you know, USSD code is one of the best sites to get information related to any telecom company? It has every code and method to know about sim card details.

  49. All your work of yours are so very beautiful because it share very important information with us present here.
    Best Web Designing Course in Delhi.
    Arth Institute Delhi Website is the perfect platform for user to make online presence. Arth Institute Delhi offers premium web designing in Delhi. In Arth Institute’s web designing course, you will be taught how to make a website in both the form: static and dynamic. At Arth Institute Delhi, our professional trainees will help you to get satisfied and complete knowledge to make your career.

  50. Join the Advanced Excel Training programme at Arth Institute Delhi if you wish to brighten your future. Even if you have no prior experience with MS Excel, we provide a top Microsoft Excel training in Delhi where you can simply pick up advanced excel skills. All of the instructors at Arth Institute Delhi are Microsoft Certified and have extensive Excel knowledge. The curriculum at Arth Institute Delhi has been designed to reflect the demands of the workplace so that graduates can do job effectively using MS Excel and establish their distinctive identities inside the organisation. Depending on the student’s abilities, the Excel training course programme at Arth Institute Delhi varies.

    Regardless of whether you’re looking for the best Excel training in Delhi or want to become a master of the programme through a government-recognized certification training programme. There is no rival to Arth Institute advanced Excel training in Delhi. We also have the honour of being the Delhi Microsoft Authorized Training Center. We strive to improve our students’ excel knowledge. Those who have completed the Delhi training session at Arth Institute are more than prepared to use their skills on the job.

Leave a Reply

Your email address will not be published. Required fields are marked *