any idea how I can get specific settings in a vm host profile?
something like
There is no general rule, but in this case, it is rather straightforward.
$hp = Get-VMHostProfile -Name $profName
$hp.ExtensionData.Config.ApplyProfile.Property | where{$_.PropertyName -match 'snmp'} |
ForEach-Object -Process {
$_.Profile.Property.Profile.Policy.policyoption.Parameter
}
Since the structure of a hostprofile is not too obvious and poorly documented, it mostly boils down to a trial and error situation.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There is no general rule, but in this case, it is rather straightforward.
$hp = Get-VMHostProfile -Name $profName
$hp.ExtensionData.Config.ApplyProfile.Property | where{$_.PropertyName -match 'snmp'} |
ForEach-Object -Process {
$_.Profile.Property.Profile.Policy.policyoption.Parameter
}
Since the structure of a hostprofile is not too obvious and poorly documented, it mostly boils down to a trial and error situation.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks luc