Wmi Query Printer Serial Number
010518by admin

Wmi Query Printer Serial Number

Apr 16, 2014. Is there any way to gather Serial Number info for HP Printers on Windows using only the CMD? I don't need a third party tool. What I need is to be able to query them from CMD. For the workstations I use the [wmic /node:COMPUTER bios get serialnumber] command to get what I want. I was wondering if. Sybil 2007 Download Free.

I'm building an inventory script that takes all kinds of data from our servers and workstations. The data is put in some HTML pages for us to view. My CEO would also like to see the printers in there. I did some searching and found the Win32_Printer WMI class to be very useful to get almost everything I want from the printer but I did not find anything about getting the serial number of the printer. Do any of you guys know if it is possible to get the serial number of the printer by using (for example) WMI?

Wmi Query Printer Serial Number

I'm looking for a VBScript or any other utility available to get the serial number of Lexmark printers. I already have this little script that gives me other details of a specific printer Dim objWMIService, objItem, colItems, strComputer strComputer ='??????' Let's try a little test.

Here's a BAT script to run as a test that will try and get just the serial number. Save it as a bat and edit the IP line to be the printer IP. Lungi Dance Honey Singh Official Video Download more.

You will also need the attached utility file in the folder you run the BAT from. Download it and rename to an EXE file. @echo off setlocal EnableDelayedExpansion setlocal EnableExtensions set IP=1.2.3.4 REM Get Serial call:DoSnmpGet '%IP%' '.1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0' 'Serial' REM If no serial found, try the XEROX MIB to see if it responds if '!Serial!'

Wmi Query Printer Serial Number

=='N/A' ( call:DoSnmpGet '%IP%' '.1.3.6.1.2.1.43.5.1.1.17.1' 'Serial' REM If no serial found, try the RICOH MIB to see if it responds if '!Serial!' =='N/A' ( call:DoSnmpGet '%IP%' '.1.3.6.1.4.1.367.3.2.1.2.1.4.0' 'Serial' if NOT '!Serial!' =='N/A' ( for /F 'tokens=1 delims=,'%%z in (!Serial!) do set Serial=%%z set Serial=!Serial:'=!

) ) else ( for /F 'tokens=1 delims=,'%%z in (!Serial!) do set Serial=%%z set Serial=!Serial:'=! ) ) echo Serial=%Serial% exit /b:DoSnmpGet REM Use SNMPGET to fetch value for IP and MIB passed in, return in variable passed in set%~3=N/A for /F 'tokens=1-3*'%%t in ('snmpget -O T -v 1 -c public%~1%~2 2^>nul^ find '=') do ( set SnmpgetResult=%%w if '%%v'=='Hex-STRING:' ( set SnmpgetResult=!SnmpgetResult: =! For /F 'tokens=2 delims=[.]'%%z in ('!SnmpgetResult!' ) do set SnmpgetResult=%%z ) set%~3=!SnmpgetResult! ) exit /b Select all ~bp.