SNMP Settings Script
Ok so I am trying to follow the script mentioned in
http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2management/thread/06b48ced-1bb1-4adf-91e1-2dc8502e0273?prof=required
for setting SNMP, however I am getting too many command line parameters error, i tried with quotes, without quotes.
Please advise.
=====================================================================
@echo off
cls
echo.
echo.
echo ConfigSNMP_QGOG cersao 1.0fb
echo.
echo.
echo BEFORE
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters" /s
pause
cls
echo.
echo.
echo CHANGE
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters" /v EnableAuthenticationTraps /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers" /v 1 /t REG_SZ /d nagios.abc.com /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers" /v 2 /t REG_SZ /d monitoracao.abc.com /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\ValidCommunities" /v public /t REG_DWORD /d 4 /f
pause
cls
echo.
echo.
echo AFTER
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters" /s
pause
cls
echo.
echo.
echo net stop snmp
net stop snmp
pause
cls
echo.
echo.
echo net start snmp
net start snmp
pause
=====================================================================Adam
March 25th, 2011 6:23pm
For scripting questions, post in "The Official Scripting Guys Forum!":
http://social.technet.microsoft.com/Forums/en-US/ITCG/threads
This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.Microsoft
Student Partner
Microsoft Certified Professional
Microsoft Certified Systems Administrator: Security
Microsoft Certified Systems Engineer: Security
Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration
Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration
Free Windows Admin Tool Kit Click here and download it now
March 25th, 2011 6:37pm


