Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Help with set-vmhostsnmp

$
0
0

I'm trying to add the a new SNMP target to a ESX 4 host connected directly to the host using the following powercli command.

 

 

Set-VMHostSnmp-HostSnmp (get-vmhostsnmp)-AddTarget-TargetCommunity$trapCommunity-TargetHost$trapDestination

 

And I'm getting the following error.

 

Set-VMHostSnmp : 07/01/2013 08:14:23 Set-VMHostSnmp Object reference not set to an instance of an object.

 

At line:1 char:1

+ Set-VMHostSnmp -HostSnmp $snmpObj -AddTarget -TargetCommunity $trapCommunity -Ta ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Set-VMHostSnmp], VimException

+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVmHost

 

 

The same script has worked fine on all ESXi 4.1 hosts.

 

I've verified it's running by checking the following

 

Get-VMHostFirewallException| where {$_.Name -like "SNMP*"}

 

Name                 Enabled IncomingPorts  OutgoingPorts  Protocols  ServiceRunning
----                 ------- -------------  -------------  ---------  --------------
SNMP Server          True    161            162            UDP        

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

All help greatly appreciated.


Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>