Wmi Query Printer Serial Number

  воскресенье 19 апреля
      74
Wmi Query Printer Serial Number Average ratng: 3,7/5 1574 reviews

Introduction: Wmic Powershell Script to Get Computer Information Using 'wmic' Command (Serial Number, Manufacturer, Model, Network Printers)

# Using wmic command to get information about computer and write to file
# To use: Right click on File name > Left click on 'Run in Powershell'
# Or hit F5 from within Powershell ISE editor

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. Enabling inbound WMI in Windows firewall. System query with msinfo32 ^. The msinfo32.exe utility has been part of the operating system for many Windows versions. The tool is commonly used for reading the configuration of the local computer.

# Create a file on the C drive
out-file c:tempcomputerinfofile.txt

# Get the serial number and overwrite text file if it exists already
wmic bios get serialnumber > c:tempcomputerinfofile.txt

# Get the manufacturer and add it to the end of the text file
wmic computersystem get manufacturer >> c:tempcomputerinfofile.txt

# Get the model of the computer and add it to the end of the text file
wmic computersystem get model >> c:tempcomputerinfofile.txt

# Get the printers that are connected to the computer and add to the end of the text file
wmic printer get name >> c:tempcomputerinfofile.txt

write-output '-------------------'

write-output '-------------------'
write-output 'Please open the text file on your I drive now to check data.'
write-output 'Written by Matt R'

Teacher Notes

Betterzip (free version download for mac. Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Be the First to Share

Recommendations

4 408
20 2.8K
302 26K
  • Arduino Contest 2020

  • First Time Author Contest

  • Space Challenge

On Windows 10, there could be a lot of reasons you may need to determine specific details (such as serial number, model, firmware version, etc.) about the hard drive on your computer. For instance, when you need to contact technical support to troubleshoot issues or start the process to get a replacement. You're planning to build an array and want to make sure the new drives are the same make and model. Or you're building a detailed inventory of your devices, need to update its firmware, and more.

Of course, a lot of this information you can find it on the label attached to the drive. When the drive is already installed on your computer, you can save a lot of steps and hassles by querying the details you need using the Windows Management Interface Command (wmic) tool with Command Prompt available on Windows 10.

In this Windows 10 guide, we'll walk you through the steps to get information about the hard drives (and removable drives) connected to your device. Additionally, we'll also show you the steps to export the details to text files that you can keep for personal records or send to technical support.

How to check hard drive information using Command Prompt

If you need to find out the hard drive serial number, model, firmware version, and other information, you can use the wmic with Command Prompt.

Basic hard drive info

To determine some basic information about the hard drive installed on your device, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Type the following command to check the name, brand, model, and serial number information and press Enter:

    wmic diskdrive get model,serialNumber,size,mediaType

    Source: Windows Central

Once you complete the steps, the command will return the manufacturer, model, serial number, size (bytes), including removable drives like external hard drives and USB flash drives.

You could also add the 'manufacturer' and 'name' options, but they usually don't return any additional information already available with the option specified in the above command.

Advanced hard drive info

If you need more advanced information about the hard drive, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Griffin powermate 2.0. Type the following command to name, brand, model, and serial number information and press Enter:

    wmic diskdrive get model,index,firmwareRevision,status,interfaceType,totalHeads,totalTracks,totalCylinders,totalSectors,partitions

    Source: Windows Central

After you complete the steps, the command will output all the information requested formatted in an easy to digest table, including manufacturer, model, serial number, and physical location (port) of all the drives connected to your computer.

Also, you'll be able to determine if any hard drives are reporting hardware problems. The version of the firmware that controls the drive. The type of interface the device is using to connect to the motherboard, as well as the number of partitions and the number of heads, tracks, cylinders, and sectors.

If you're looking to upgrade the storage on your device, we recommend the 860 EVO 500GB Solid-State Drive (SSD) from Samsung because of its reliability, fast read and write speeds and price.

Our pick

Samsung 860 EVO 500GB

This hard drive is reliable and has a proven track record of quality. Its 550MB/s read and 520MB/s write speeds are enough for the majority of users. The price listed here is for the 500GB model, but you can get up to 4TB. $70 at Amazon

Although we're showing you the steps to query specific hard drive information, you can edit the command to find out only the details you need.

Here's the full list of available options:

  • Availability.
  • BytesPerSector.
  • Capabilities.
  • CapabilityDescriptions.
  • Caption.
  • CompressionMethod.
  • ConfigManagerErrorCode.
  • ConfigManagerUserConfig.
  • CreationClassName.
  • DefaultBlockSize.
  • Description.
  • DeviceID.
  • ErrorCleared.
  • ErrorDescription.
  • ErrorMethodology.
  • FirmwareRevision.
  • Index.
  • InstallDate.
  • InterfaceType.
  • LastErrorCode.
  • Manufacturer.
  • MaxBlockSize.
  • MaxMediaSize.
  • MediaLoaded.
  • MediaType.
  • MinBlockSize.
  • Model.
  • Name.
  • NeedsCleaning.
  • NumberOfMediaSupported.
  • Partitions.
  • PNPDeviceID.
  • PowerManagementCapabilities.
  • PowerManagementSupported.
  • SCSIBus.
  • SCSILogicalUnit.
  • SCSIPort.
  • SCSITargetId.
  • SectorsPerTrack.
  • SerialNumber.
  • Signature.
  • Size.
  • Status.
  • StatusInfo.
  • SystemCreationClassName.
  • SystemName.
  • TotalCylinders.
  • TotalHeads.
  • TotalSectors.
  • TotalTracks.
  • TracksPerCylinder.

How to export hard drive information to text file using Command Prompt

If you want to export the hard drive details to a text file that you can share easily, use these steps:

  1. Open Start.
  2. Search for Command Prompt and click the top result to open the app.
  3. Type the following command to name, brand, model, and serial number information and press Enter:

    wmic diskdrive get model,serialNumber,index,mediaType > C:PATHTOTEXT.TXT

    This example exports the hard drive details to the current user's folder:

    wmic diskdrive get model,serialNumber,index,mediaType > C:Usersuser1Documentshdd-info.txt

    Source: Windows Central

Once you complete the steps, the information you specified will export to a text file that you can then send to technical support or keep for your records.

We're focusing this guide on Command Prompt, but you can also use these commands with PowerShell.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

We may earn a commission for purchases using our links. Learn more.

Much faster 🔥🙌

Benchmarks: Surface Go 2 with Intel Core m3 is looking great

The Surface Go 2 comes to markets globally starting May 12th. We've been spending the last day with the new ultra-portable PC with the updated Core m3 processor and LTE. Here are some early benchmarks, how it compares to the original Surface Go, and some other things we've noticed.