Script to configure a SNMP Service

Discussion in 'Scripting' started by Gustavo, Sep 20, 2007.

  1. Gustavo

    Gustavo Guest

    I need to find a script to help me, set the SNMP service on more than 300
    servers, I need to configure the new settings of the SNMP, (security,
    comunity, and so on), thanks.
     
    Gustavo, Sep 20, 2007
    #1
    1. Advertisements

  2. Hi can you change some settings with GPO's.

    Computer Configuration/Administrative Templates/Network/SNMP
    But only:
    Communities
    Permitted Managers
    Traps for public community

    I know you probably need more settings but wanted to mention it anyway.

    Floris van Haaster
     
    Floris van Haaster, Sep 21, 2007
    #2
    1. Advertisements

  3. Gustavo

    Lyle Shaff Guest

    You could configure the service on one server, export the settings to a reg file, and then call that with a scrip on each system.

    That is what I just did to configure the SNMP Service as a task in MDT 2010, I do not see why you could not use PSEXEC in conjunction with this.

    SAMPLE REG FILE - HKLM-SNMP.reg

    Windows Registry Editor Version 5.00

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

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers]

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

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

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\TrapConfiguration\public]
    "1"="127.0.0.1"

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



    SAMPLE SCRIPT FILE - ConfigureSNMPService.bat

    @ECHO OFF
    net stop "SNMP Service"
    regedit /s HKLM-SNMP.reg
    net start "SNMP Service"

    Lyle



    Gustav wrote:

    Script to configure a SNMP Service
    20-Sep-07

    I need to find a script to help me, set the SNMP service on more than 30
    servers, I need to configure the new settings of the SNMP, (security
    comunity, and so on), thanks.

    Previous Posts In This Thread:

    Script to configure a SNMP Service
    I need to find a script to help me, set the SNMP service on more than 30
    servers, I need to configure the new settings of the SNMP, (security
    comunity, and so on), thanks.

    Hi can you change some settings with GPO's.
    Hi can you change some settings with GPO's

    Computer Configuration/Administrative Templates/Network/SNM
    But only
    Communitie
    Permitted Manager
    Traps for public communit

    I know you probably need more settings but wanted to mention it anyway

    Floris van Haaste



    Submitted via EggHeadCafe - Software Developer Portal of Choice
    Win a free Professional license of CodeSmith Generator 5.2!
    http://www.eggheadcafe.com/tutorial...sional-license-of-codesmith-generator-52.aspx
     
    Lyle Shaff, Jul 30, 2010
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.