Automate modifying SNMP strings on Windows computers

In this world of auditing and compliance, if you don’t have policies documented to change anything that is remotely related to a system password on a regular basis – I would highly encourage you to give it serious consideration.

Let’s say you have a bunch of Windows Servers in your Data Center running the SNMP service. Let’s also say that they are running the < *gulp*> default community strings. It is definately time to change them.

This script will help you automate this process. Once you change them all once – the hard part is over, now that you know all the management systems that need to change when the community strings change. Hopefully, this process is documented after your first time and can be setup to change them on a regular interval (I would recommend every 3 – 6 months).

The instructions for this script is pretty self explanatory. Here is what you need to know:

  • The script needs to be run from a machine that is logged in with valid credentials for modifying the registry and start/stopping services
  • You need a .txt file containing a computer name or IP address per line that you want to change
  • 3 lines that need modifying in the script
  • strDWORDOldName needs to be set to your current SNMP string
  • strDWORDNewName needs to be set to your new SNMP string
  • objTextFile has a path parameter that needs to be adjusted to where you have the machine input file
  • At the command prompt – Change to the directory where the script resides and run: cscript changesnmp.vbs
  • That’s about it.

    Here is the zip file…

    This entry was posted in . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

    Post a Comment

    Your email is never published nor shared. Required fields are marked *

    *
    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>