![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Probs trying to use snmp to get info from printer Hi. I am trying to use the get method of the com object "OlePrn.OleSNMP" to get info from printers. The sequence I've used: $a=new-object -comobject "OlePrn.OleSNMP" $a.Open($IPAddressOfPrinter,"public",1,2000) $v=$a.get(".1.3.6.1.2.1.1.4.0") This should return the value of the contact. If I watch the net traffic I see the correct response return from the printer. But in powershell I see "Exception calling "Get" with "1" argument(s): "WinSNMP API Error: For internal/undefined errors" At line:1 char:7 + $a.get( <<<< ".1.3.6.1.2.1.1.4.0")" Can anyone suggest how I avoid this error and get the value returned by the printer? TIA Eddy from Hobart in Tasmania in Australia. |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Probs trying to use snmp to get info from printer Try something like this instead: $z=$a.open... $v=$z.get... Marco |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Probs trying to use snmp to get info from printer Tried that Marco but the $a.open does not return anything so I get "You cannot call a method on a null-valued expression" from the $z.get. Eddy "marco.shaw@gmail.com" wrote: > Try something like this instead: > > $z=$a.open... > $v=$z.get... |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Powershell and SNMP | CodeTestDummy | PowerShell | 9 | 05-12-2008 08:32 PM |
| Please wait while the printer sends info. to Windows | Brian55 | Vista print fax & scan | 5 | 04-29-2008 12:06 PM |
| SNMP Community names on Vista | Dee | Vista installation & setup | 2 | 02-03-2008 07:13 AM |
| Powershell use of SNMP WMI Provider | OwenC | PowerShell | 2 | 06-02-2007 06:15 PM |
| Using PowerShell to get SNMP/Memory Usage data, is it possible? | DreamweaverN | PowerShell | 1 | 10-30-2006 05:36 AM |