This cmdlet is part of the Vexasoft Cmdlet Library. You can download it now or click here to find out more.

Get-SNMPServiceState

Synopsis

Gets the status of the SNMP service of a local or remote computer.

Syntax

  • Get-SNMPServiceState [-ComputerName] [-Credential]

Description

The Get-SNMPServiceState cmdlet is used to retrieve the status of the SNMP service on the local or a remote computer.

Parameters

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

Inputs

Get-SNMPServiceState accepts pipeline input only for the ComputerName parameter and requires that the input object contain a property named either Computer, CN or ComputerName.

Outputs

Get-SNMPServiceState outputs a Vexasoft.SNMPState object detailing the status of the SNMP service on the target computer.

Notes

The Get-SNMPServiceState 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 1

This command will retrieve the SNMP service state on the local computer:

C:\PS>Get-SNMPServiceState

Example 2

This command will retrieve the SNMP service state on the remote computer PC01:

C:\PS>Get-SNMPServiceState -Computer PC01