Created
March 25, 2014 21:04
-
-
Save jm66/9771333 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cls | |
echo Config_SNMP_VSS 01. | |
echo "Backing up current SNMP settings" | |
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters" /s | |
pause | |
cls | |
echo "Changing to desired settings. Adding 128.100.102.151 / community string dcbread / Syslocation DBC / sysContact [email protected]" | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers" /v 1 /t REG_SZ /d 128.100.102.151 /f | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\ValidCommunities" /v dcbread /t REG_DWORD /d 4 /f | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent" /v sysLocation /t REG_SZ /d DCB /f | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent" /v sysContact /t REG_SZ /d [email protected] /f | |
pause | |
cls | |
echo "SNMP settings after configuring" | |
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters" /s | |
pause | |
echo "Restarting SNMP services." | |
echo net stop snmp | |
net stop snmp | |
pause | |
echo net start snmp | |
net start snmp | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment