Do anyone know about the script which will pull up the information of "snmp.trapEnterpriseFlag" parameter like is it set to 1 or to 0. We have more than 80 Switch in our environment. So it is little time consuming to go to each switch individually and check this parameter.
Moreover do anyone also have script with the help of which we can change the parameter of "snmp.trapEnterpriseFlag" either from 0 to 1 or vice versa.
if you the command you need to issue in the switch:
Quick and dirty solution:
- get the plink.exe (it comes with putty)
run this way: plink.exe -pw
this will connect to the switch, runs the command and show the result in the stdout.
A more elegant solution
- Use python and paramiko to connect to the switches and run the commands
client = paramiko.SSHClient()
stdin, stdout, stderr = objClient.exec_command(txtComando)
while not stdout.channel.exit_status_ready():