No announcement yet.

enable SNMP fro win xp from script

  • Filter
  • Time
  • Show
Clear All
new posts

  • enable SNMP fro win xp from script

    Hello all

    my qustion is:

    I need to anable the SNMP on a windows Xp for a round 100 computers
    any idia if i can do it with a script or batch file on loginscript..?



  • #2
    Re: enable SNMP fro win xp from script

    Is SNMP already installed on the clients?
    And you now want to set the SNMP Service properies?

    By default two SNMP services is set to start automatically after installation:
    SNMP Service - Includes agents that monitor the activity in network devices and report to the network console workstation.
    SNMP Trap Service - Receives trap messages generated by local or remote SNMP agents and forwards the messages to SNMP management programs running on this computer.

    If you have to install the Windows component on all the clients first, you can use

    Sysocmgr.exe /i:%WINDIR%\inf\sysoc.inf /u:c:\unattend.txt


    After installation you can configure the service by editing the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\SNMP\

    If you have one example of registry settings you can copy that with a script to all the clients


    :: EDIT ::
    nb. You cannot install and configure SNMP by logon script, if the user is not a member of the local administrators! So you you have to use a computer startup script!

    I found this example batch on the internet.
    Originally posted by [url=]pARODY[/url]
    heres a batch file i wrote

    note.. SourcePath refers to c:\ assuming you've copied the i386 directory from the CD to c:\i386
    kudos to Joe Wu and others who gave me some tips.

    REM SNMP install script - pARODY 02-11-05
    REM parody [@]
    echo Windows Registry Editor Version 5.00
    echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\S NMP\Parameters\RFC1156Agent]
    echo "sysContact"="Your Name"
    echo "sysLocation"="Department or Location"
    echo "sysServices"=dword:0000004d
    echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\S NMP\Parameters\ValidCommunities]
    echo "public"=dword:00000004
    echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Setup]
    echo "SourcePath"="C:\"
    ) > c:\setup.reg
    regedit /s /q c:\setup.reg
    echo ;SetupMgrTag
    echo [NetOptionalComponents]
    echo SNMP=1
    echo [SNMP]
    echo Any_Host=YES
    ) > c:\snmp.txt
    sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\snmp.txt
    But most settings for the service can also be done by computerconfiguration GPO

    Last edited by Rems; 3rd May 2007, 14:35.

    This posting is provided "AS IS" with no warranties, and confers no rights.


    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts