SynopsisGets the SNMP trap communities and destinations for a local or remote computer.
- Get-SNMPTrapCommunity [-ComputerName] [-Credential]
DescriptionThe Get-SNMPTrapCommunity cmdlet is used to retrieve the SNMP trap communities and trap destinations configured on the local or a remote computer.
- ComputerName The computer against which to run the cmdlet. By default this parameter will be populated with the name of the local computer.
- Credential The credentials under which to run the cmdlet. By default this cmdlet will run as the current user. Using this parameter and the Get-PSCredential cmdlet you can specify an alternate set of credentials under which to execute this command.
InputsGet-SNMPTrapCommunity accepts pipeline input only for the ComputerName parameter and requires that the input object contain a property named either Computer, CN or ComputerName.
OutputsGet-SNMPTrapCommunity outputs a Vexasoft.SNMPTrapCommunity object detailing the trap community and destination configuration of the target computer.
NotesThe Get-SNMPTrapCommunity cmdlet requires that the RPC service is started on the computer it is trying to access and that DNS services are available to resolve target host names.
Example 1This command will retrieve the SNMP Trap Communities configured on the local computer:
Example 2This command will retrieve the SNMP Trap Communities configured on the remote computer PC01:
C:\PS>Get-SNMPTrapCommunity -Computer PC01