NetCmdlets Part 2: PowerShell cmdlet for SNMP (network management)

The SNMP PowerShell cmdlets that come with /n software NetCmdlets support SNMP v1, v2c, and v3, SNMPv3 auth/priv, MIB loading, etc. Here are some examples of using the Get-SNMP, Set-SNMP, Send-Trap, and Get-Trap cmdlets.

Find SNMP enabled machines (agents) on your network:
PS C:\> get-snmp -agent 255.255.255.255 -oid sysName.0

Find processes running on a remote snmp-enabled machine:
PS C:\> get-snmp -agent myagent -oid hrSWRunName -walk $true

Send an SNMP trap to a remote manager:
PS C:\> send-trap -manager somemgr -oid coldStart

Set the system contact information for an agent:
PS C:\> set-snmp -agent myagent -oid sysContact.0 -value lance@nsoftware.com

There's a cool demo that comes installed with NetCmdlets that shows how to find the network throughput utilization of each network interface on a particular agent. It does this by walking the ifTable (interface table), checking the bytes going in and out over time and comparing that to the speed of the interface:

Technorati : , , ,

Print | posted on Thursday, November 9, 2006 12:10 PM

Feedback

# Re: PowerShell and SNMP

Left by Channel 9 at 6/14/2007 1:08 AM
Gravatar NetCmdlets contains get-snmp, set-snmp, get-trap, and send-trap cmdlets.

# re: NetCmdlets Part 2: PowerShell cmdlet for SNMP (network management)

Left by Doan at 7/30/2010 10:40 AM

Your comment:





 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski