?
Solved

Configure Windows SNMP with VBscript

Posted on 2011-03-25
4
Medium Priority
?
2,003 Views
Last Modified: 2012-05-11
Configure Windows SNMP with VBscript

I have an SNMP service to configure in 100 windows 2003 server.
I need a script that reads the name of the servers from a text file-- the names are lined up in a column-- and makes the change to the SNMP config for each server.

the Tabs and fields I need to modify are :

Agent Tab:
Service
Physical=checked
Applications=Checked
Datalink and subnetworks=checked
Internet=checked
End-to-end=checked

Traps Tab
Community name=public
Trap destination= 10.10.10.10

Security Tab:

Community
Public= Read Only
Private = Read Create

Accept SNMP packets from these hosts= selected
                 10.10.10.10




0
Comment
Question by:jskfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
sam0x01 earned 2000 total points
ID: 35229149
Save the below as a .reg file
Try importing this reg file into a test server with the same production SNMP settings.

If this corrupts the SNMP Settings, then I am unsure how this can be done.
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters]
"EnableAuthenticationTraps"=dword:00000001
"NameResolutionRetries"=dword:00000010

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers]
"1"="10.10.10.10"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent]
"sysContact"=""
"sysLocation"=""
"sysServices"=dword:0000004f

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration\public]
"1"="10.10.10.10"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities]
"public"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Security]
"Security"=hex:01,00,14,80,b8,00,00,00,c4,00,00,00,14,00,00,00,30,00,00,00,02,\
  00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
  00,00,02,00,88,00,06,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
  05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
  20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,04,00,00,00,00,\
  00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,06,00,00,00,00,00,14,00,00,01,\
  00,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,00,18,00,fd,01,02,00,01,02,00,\
  00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,00,00,00,00,00,05,12,00,00,00,\
  01,01,00,00,00,00,00,05,12,00,00,00

Open in new window

0
 

Author Comment

by:jskfan
ID: 35340197
Thanks..
I tried it in my workstation and it worked just fine.

How do I deploy it to multiple computers without login into each computer?
0
 
LVL 3

Assisted Solution

by:sam0x01
sam0x01 earned 2000 total points
ID: 35347451
You can run "regedit /s \\servername\share\path\filename.reg" or "reg /import as the command to import. Unfortunately neither regedit or reg /import allow to perform this remotely.

Suggest putting the .reg file on a shared resource and using psexec to perform this remotely. Psexec is a command that allows remote execution of tasks.

Make sure you try it on a single server before pushing it to the masses because it may behave unusually if there is prior SNMP config.

Alternative ways would be using the "AT" command to schedule once. Think schtasks also is in Windows 2003 Server.
0
 

Author Closing Comment

by:jskfan
ID: 35453213
thanks a lot
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question