Thierry The Best !

Thierry The Best !

Windows - Ajout SNMP in Windows - 2 -

Windows - Ajout SNMP in Windows - 2 -

This script creates an answer file for an unattended install of SNMP, then uses psexec to start sysocmgr which actually starts the SNMP install process. This method is MUCH better than my previously posted method since in my previous method, the tabs for configuring SNMP (traps etc.) were not showing up. You could create your own answer file and do this manually, IE use admin. share to copy the UA file out and then use psexec and use the command line below. You'll also note there is ALOT less code involved

RemotePC="."

Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = Wscript.CreateObject("WScript.Shell")
Set uaFile = fso.CreateTextFile("" & RemotePC & "c$snmp.ua",True)

uaFile.Writeline "[NetOptionalComponents]"
uaFile.Writeline "SNMP = 1"
uaFile.Close
shell.run "psexec " & RemotePC & " -s -i -d sysocmgr /i:%windir%infsysoc.inf /u:c:snmp.ua /x /q", vbHide



Understand what you use.
MSDN|MS Script center|WMI|LDAP scripting|LDAP|W3Schools|SANS Internet Storm Center|Tutorialized|WoW


10/12/2008
0 Poster un commentaire

A découvrir aussi


Ces blogs de Informatique & Internet pourraient vous intéresser

Inscrivez-vous au blog

Soyez prévenu par email des prochaines mises à jour

Rejoignez les 4 autres membres