Hi there
I need to update all our hosts with the following details below and found a great script for that but missing the step for updating the last 2 items. The script uses the values position based on "esxcli.system.snmp.get" but i'm unable to see the position for " --hwsrc sensors & --hwsrc indications". Any idea where i'm going wring?
Values to update:
esxcli system snmp set –c XXXXXXXX
esxcli system snmp set –t 172.22.145.10@162/XXXXXXXXX
esxcli system snmp set –e true
esxcli system snmp set --hwsrc sensors
esxcli system snmp set --hwsrc indications
Script I propose to use:
$esxlist = get-vmhost
$communities = “XXXXXXXXX”
$enable = $true
$port = 162
foreach($item in $esxlist){
Connect-VIServer -Server $item -User root -Password “<rootpassword>”
$esxcli = Get-EsxCli -VMhost $item
$esxcli.system.snmp.set($null,”$communities”,”$enable”)
$esxcli.system.snmp.get()
}