4

I run this command in my windows 10 powershell:

wmic path win32_physicalmedia get SerialNumber

get result with normal user permission:

SerialNumber
ACE4_2E81_7004_1B90.

get result with administrator permission:

SerialNumber
EJ82N176910102N4Q

I think EJ82N176910102N4Q is correct.

Why the two results are different?

Is there a way to convert ACE4_2E81_7004_1B90. to EJ82N176910102N4Q?

The command Get-WMIObject win32_physicalmedia|Format-List Tag,SerialNumber has the same problem. enter image description here

Flynn
  • 51
  • 3
  • 1
    [1] do you only have one device? my 1st suspicion would be different devices. [*grin*] [2] have you tried using one of the powershell commands instead of WMIC.exe? – Lee_Dailey Feb 20 '20 at 11:07
  • I run commands in one device(Windows 10). I have tried the powershell command```Get-WMIObject win32_physicalmedia|Format-List Tag,SerialNumber```,but it has the same problem. – Flynn Feb 20 '20 at 11:57
  • thank you for the added info. [*grin*] i cannot think of any reason for the problem you are having ... nor any workaround for it. [*blush*] i will go back to lurking ... good luck! – Lee_Dailey Feb 20 '20 at 12:11
  • Do you also see this difference when using `Get-WmiObject -Class Win32_DiskDrive | Format-List DeviceID, SerialNumber` ? – Theo Feb 20 '20 at 13:56
  • ```Get-WmiObject -Class Win32_DiskDrive | Format-List DeviceID, SerialNumber``` get the same result ```ACE4_2E81_7004_1B90.``` in two cases. – Flynn Feb 20 '20 at 14:10
  • It looks like the [Win32_PhysicalMedia class](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/cimwin32a/win32-physicalmedia) has been superseded (as of Vista?) by the [Win32_DiskDrive class](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-diskdrive). I don't know why the difference in output for a normal user and the administrator. On my machine there is no difference. Maybe it has something to do with encoding or endianess? – Theo Feb 20 '20 at 14:20

0 Answers0