Author Posts

September 19, 2013 at 12:02 am

Hi All,
Am trying to automate SNMP servuices settings.
Well I am successful in adding SNMP feature in my machine and adding community in SNMP Service->Properties->Trap through vbscript. I next want to add community in Security tab which I thought Powershell cmdlet can do but am facing issue with it. Set-SNMPCommunity is throwing error as unrecognised cmdlet.
I even imported ServerManager module
Looking forward for an apt solution

September 19, 2013 at 4:15 am

Set-SNMPCommunity isn't a built-in cmdlet, even in Windows 8 / Server 2012. A web search turned up a cmdlet with that name in the Vexasoft Cmdlet Library (http://www.vexasoft.com/pages/set-snmpcommunity). If that's the one you're trying to use, you'd need to download their module.

September 19, 2013 at 11:56 pm

Ohh in that case I need to download module from Vexasoft Cmdlet Library. But I dont want to do that. Is there any other way to make it possible in powershell??

September 20, 2013 at 3:14 am

SNMP's settings are just registry values under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters". I don't know of a more convenient way to script changes without using third-party utilities, but you could always write a PowerShell function to modify the registry values and restart the service.