
je cherche à déployer les services SNMP/RSAT via gpo.
Tous mes serveurs sont des 2012R2 !
j'ai donc, après des recherches trouvé et adapté un script powershell que voici
(source : https://www.yanx.eu/installation-et-con ... p-par-gpo/)
[cpp]# Adresse du serveur WhatsUp + nom de communauté
$featuresnmp = "SNMP-Service"
$featurersat = "RSAT-SNMP"
$manager = "192.168.10.57"
$commstring = "public"
# Import ServerManager Module
Import-Module ServerManager
# Installer features nécessaires
$check = Get-WindowsFeature | Where-Object {$_.Name -eq $featuresnmp}
If ($check.Installed -ne "True")
{
Add-WindowsFeature $featuresnmp | Out-Null
Add-WindowsFeature $featurersat | Out-Null
$check = Get-WindowsFeature | Where-Object {$_.Name -eq $featuresnmp}
}
If ($check.Installed -eq "True")
{
reg add "HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\servicesSNMP\Parameters\PermittedManagers" /v 2 /t REG_SZ /d $manager /f
Foreach ( $string in $commstring )
{
reg add "HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\services\SNMP\Parameters\ValidCommunities" /v $string /t REG_DWORD /d 4 /f
reg add "HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\services\SNMP\Parameters\TrapConfiguration$string" /v 1 /t REG_SZ /d $manager /f
}
# Démarrage/redémarrage du service SNMP si non fait
Stop-Service "SNMP" >> .logScript.txt
Start-Service "SNMP" >> .logScript.txt
}[/cpp]
cependant ça ne fonctionne pas. (je l'ai bien sur déployé sur une de mes OU) rien ne s'installe/se configure.
L'un d'entre vous (ou plusieurs, plus on est de fous plus on rit) peut-il m'aider?
merci
