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
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.
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.