I want to scan all the host profiles in our environment and validate the MTU settings on all the vmk's in the profiles. However, there seems to be little to no documentation on how to access the information in a host profile via powerCLI. I want to assume all the information in a host profile can be found somewhere under the results returned from a Get-VMHostProfile but these things are massive just combing through it is not helping. This is made harder by the fact that none of the extension data in this object seems to be named or categorized the same as in the GUI...rac
Anyone else already crack this nut and willing to share the code?
I normally start from the HostApplyProfile object as documented in the API Reference.
From there you go into the subprofiles, but there is a lot of reverse engineering involved afaik.
I published one simple attempt in Change The Root Password In Hosts And Host Profiles
But it is admittedly a simple one (and I'm not even sure if it works in all vSphere versions).
yeah I saw your other answer explaining this and citing that root password script. I read through it and attempted to extrapolate the method for this purpose but due to the lack of documentation I cannot find where the actual entries in the host profile are for each setting they store. There are hundreds and they do not appear to be named in any useful way so without a doc to translate what I am looking at, I am not sure this is even possible.
If LucD says it cannot be done, I can accept that as fact.
yeah and considering that the newer releases have SMARTLY changed the host profiles to a JSON format. I think i may just wait until we upgrade. I was just wondering if the legacy host profiles weren't actually as bad as they seemed and I was missing something. Thanks for the info!