Wmi Query Local Printer Serial Number

Posted on by
  1. Get Serial Number From Wmi
  2. Wmi Computer Serial Number
  3. Canon Printer Serial Number

I am looking for a batch command to retrieve an USB key manufacturer serial number. I need a command that works in both Windows XP and Windows Seven. Common WMI queries I have found useful. To use the WMI query? The following command to extract the Manufacturer and Model of the hardware on the local machine.

Active5 months ago

I have put together a robust HP Warrant Lookup PowerShell script. However, I cannot figure out how to get a HP system's product number in an automated process. So..

How can I get HP product number (not the serial number) via PowerShell? Although I would like to do with only built-in out-of-the-box Windows and PowerShell commands, I am open to other ideas. In the end, the ultimate goal is retrieve the product number in the most reliable and least invasive way possible (i.e. installing 3rd software).

Troubleshooting

Tried:

Get-WmiObject Win32_ComputerSystem Select-Object OEMStringArray

Serial

Result:

{ABS 70/71 79 7A 7B 7C, CMS v01.4A, HP_Mute_LED_0, www.hp.com}

.. But expecting to find XT908UT#ABA

HennesZebra printer serial number lookup
60k7 gold badges94 silver badges144 bronze badges
SgtOJSgtOJ
6,4084 gold badges42 silver badges63 bronze badges

5 Answers

Here are some methods that work for various computer models.

Method 1 : Registry

The HP product number is in the registry so can be retrieved in PowerShellHKEY_LOCAL_MACHINEHARDWAREDESCRIPTIONSystemBIOSitem SystemSKU.

More information and script can be found in the article :
How to: Find the HP Product Number of all your HP server using powershell.

Method 2 : rootwmi – MS_SystemInformation

Class MS_SystemInformation contains the product number in its member SystemSKU.
(Presumably it gets it from the registry as in the first method.)

For more info see Richard Siddaway's Blog.

Method 3 : Class Win32_BIOS

The following fragment finds the product number for some computer makes. Tested on Dell.

The Microsoft reference information is found in the article Win32_BIOS class.

harrymcharrymc
284k16 gold badges302 silver badges615 bronze badges

This is tested on a HP Laptop. I think HP 'Product number' is called SystemSKUNumber in win32_computersystem WMI. Tested on my HP laptop.

Will result in:

OlofLOlofL

If anyone else comes across this question, be advised, the entirety of win32_computersystem doesn't appear to contain the product number for servers, specifically. I was unable to actually find the information via WMI, but it turns out I was actually given the product number AND serial numbers for a number of servers (the spreadsheet was horribly formatted, so the two fields just looked like one big string until my afternoon coffee kicked in).

Steve FreemanSteve Freeman
Nifle
28.9k23 gold badges97 silver badges132 bronze badges
CédricCédric

Works on Windows 7 & Windows 10From another user that posted. @harrymc

or try

Get Serial Number From Wmi

$Server can be directly replaced by a ComputerName. example..

Wmi Computer Serial Number

Keep in mind if you are on a domain you may need to provide credentials by either using an invoke-command or -credentialHp software for printer. parameter.

or

Is it possible? I would like to edit the following script file to include the printer serial number. Wmi get printer serial number. ' PrinterWMI.vbs ' Sample WMI Printer VBScript to interrogate properties ' ' -----------------------------------------------' Option Explicit Dim objWMIService, objItem, colItems, strComputer, intPrinters strComputer ='.' Note: I am in the learning phase of scripting. The following does not seem to work.

if WinRm is not configured on client, you may experience issues.

Scott
17.2k11 gold badges46 silver badges92 bronze badges
DubRub135DubRub135

Not the answer you're looking for? Browse other questions tagged powershell or ask your own question.

Active6 years ago

I am looking for a batch command to retrieve an USB key manufacturer serial number. I need a command that works in both Windows XP and Windows Seven.

This is for a hardware follow-up. I have a script that sends emails when a problem occurs and it needs to include a way to identify the removable disk.

At first I used vol e: but the number changes when the disk is formatted.

On several sites I saw wmic diskdrive get serialnumber but it doesn't seem to work (at least on W7). The command returns Invalid XML.

This is not surprising. I ran wmic diskdrive get /? and the available options are:

No SerialNumber..

Do you have a better idea?

Thanks

Maxbester
MaxbesterMaxbester

Canon Printer Serial Number

1641 gold badge2 silver badges13 bronze badges

1 Answer

I've finally found the solution on Stackoverflow.

The SerialNumber property doesn't exist.

I now use:

wmic diskdrive get PNPDeviceID

But a fix exists from Microsoft here.

Community
MaxbesterMaxbester
1641 gold badge2 silver badges13 bronze badges

Not the answer you're looking for? Browse other questions tagged windowsusbbatchshell-scriptserial or ask your own question.