top of page
Search

WMIC diskdrive get serial number invalid xml content: The problem and the workaround

  • virroundtadirag
  • Aug 16, 2023
  • 2 min read


This issue occurs because the XML parser treats the control characters that are included in the serial number of some drives as invalid. Therefore, the XML parser cannot parse content that includes these control characters. This behavior causes valid results for other drives to be displayed incorrectly, together with the behavior that is mentioned in the "Symptoms" section.


From the Windows NT-based (Windows XP and 7 specifically) command prompt, how can I get the serial number of a hard drive as a variable? The one I'm looking at is the serial number of the physical hard disk drive




wmic diskdrive get serial number invalid xml content




The hard drive serial number or the SSD serial number is different from the volume serial number. To find the hard drive serial number or the solid-state drive serial number, enter the following command in the Command Prompt.


how to get the serial number of the hard disk based on the drive letter in command prompt.I have 3 Hard Disk. I want create the batch file to get serial of special disk base on the drive letter or name.for example:


However it gets only basic information (model, brand, serial number, IP address) for other SNMP based devices such as switches and routers.Detailed network documentation information is available for:


However, connecting the USB flash drive generated 16 event records. Fortunately, all the records are generated at the same time, and the majority of the event records contain the unique serial number. Therefore, you need to investigate only one record to get what you need.


By finding the same unique USB flash drive serial number in corresponding Event ID 2003 and Event ID 2102 event records and then applying some math to the date and time stamp numbers, you can tell exactly how long a particular USB flash drive was connected to your system.


Also please make a note of the serial number, by entering this command WMIC BIOS GET SERIALNUMBER . So you can be sure you can remove the old hardware hash from the allow list. I will tell you why in the important stuff to know part!


The last thing that happens is a XOR operation being applied to the file, so we should start by performing the opposite operation in order to recover the contents before the XOR.Since the first DWORD in the original buffer is a magic value (0x531b008a), we XOR the current value (0x632B30BA) with the magic value in order to recover the key used to XOR the file (which happens to be the first four bytes of the disk driver serial number):


2. Existence of some special characters: Inventory scan fails because of special/invalid characters in WIF file. These invalid characters come from either Manufacturer, serial number or any other parameter. This can happen for both Software and Hardware components.


Example 1: Following screenshot shows the blob in the WIF of a system that was obtained by scanning a removable media/drive (USB flash) attached to a Managed ZENworks agent. The serial number consists of special characters, Hence, the WIF upload failed.


Example 2: In this case, a removable HP HD Camera is attached to a ZENworks agent device at the time of scan and the serial number consists of special characters. Hence, the scan file upload will fail. 2ff7e9595c


 
 
 

Recent Posts

See All

Kommentare


© 2023 by The Grid. Proudly created with Wix.com

Thanks for submitting!

Join our mailing list an never miss an update!

  • White Instagram Icon
  • White Facebook Icon
  • White Twitter Icon
bottom of page