SynopsisRemoves an SNMP community from on a local or remote computer.
- Remove-SNMPCommunity [-Community] [-ComputerName] [-Credential]
DescriptionThe Remove-SNMPCommunity cmdlet is used to remove SNMP community strings on the local or a remote computer.
- Community Remove this community string.
- 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.
InputsRemove-SNMPCommunity accepts the output of Get-SNMPCommunity as an input object. The Community and ComputerName parameters each accept pipeline input by property name.
OutputsRemove-SNMPCommunity makes changes directly to Windows and does not output any Powershell objects.
NotesThe Remove-SNMPCommunity 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 1In this command the community string 'Monitoring' is removed from the remote computer PC01:
Remove-SNMPCommunity -Community Monitoring -Computer PC01
Example 2The Get-SNMPCommunity cmdlet can be used in conjunction with the Remove-SNMPCommunity cmdlet. In this example all communities configured on the local computer are removed:
Get-SNMPCommunity | Remove-SNMPCommunity