[reflection.assembly]::LoadFrom("C:\Users\sinhaa\Downloads\tritonmate_8.0_bin\SharpSnmpLib.dll") $DHost="10.226.179.161" #[reflection.assembly]::LoadFrom("C:\Users\sinhaa\Downloads\bigdipper_7.0_bin\SharpSnmpLib.dll") $manager = [system.Net.Dns]::Resolve( $DHost ).AddressList[0] $TrapDest = New-Object Net.IPEndPoint( $manager, 162 ) [IPAddress]$Sender = (gwmi Win32_NetworkAdapterConfiguration | ? { $_.IPAddress -ne $null }).ipaddress[0] $v1GenObj = New-Object "System.Collections.Generic.List``1[Lextm.SharpSnmpLib.Variable]" [Lextm.SharpSnmpLib.Messaging.Messenger]::SendTrapV1( $TrapDest,$Sender,[Lextm.SharpSnmpLib.OctetString]"public",[Lextm.SharpSnmpLib.ObjectIdentifier]".1.3.6.1.2.1.1.5.0",[Lextm.SharpSnmpLib.GenericCode]::ColdStart,0,0,$v1GenObj) $v2GenObj = New-Object "System.Collections.Generic.List``1[Lextm.SharpSnmpLib.Variable]" [Lextm.SharpSnmpLib.Messaging.Messenger]::SendTrapV2( 0, [Lextm.SharpSnmpLib.VersionCode]"v2", $TrapDest,[Lextm.SharpSnmpLib.OctetString]"public",[Lextm.SharpSnmpLib.ObjectIdentifier]"1.3.6.2.9.8",0,$v2GenObj)