Powershell – Install SNMP Services Remotely on Windows Server 2008R2
The script below assumes you have an active directory group with all the servers as members.
# import the powershell active direcory module Import-Module ActiveDirectory # get the group members $servers = Get-ADGroupMember -Identity GroupWithServersInIt # install SNMP on the servers foreach ($server in $servers) { invoke-command -computername $server.name -ScriptBlock {import-module ServerManager; Add-WindowsFeature SNMP-Services} }