2

I would like to retrieve the Apple USB Keyboard's serial number from a command to use in a script.

What command can I use ?

| improve this question | | | | |
  • Can you elaborate as to why? To my knowledge, there's no way to get the serial number through software, and it might be possible to accomplish whatever you're trying to do in an alternative manner. – JMY1000 May 20 '16 at 19:55
  • In my company, employees exchange keyboards when they are failures. I would like to receive the serial numbers by a script every day to see which changes keyboards – Thomas R May 28 '16 at 20:47
  • Afraid you're probably out of luck then. – JMY1000 May 28 '16 at 22:09
2

I don't think you can. The information that you can get is available via System Profiler: system_profiler SPUSBDataType, which on my Macbook returns:

    Apple Internal Keyboard / Trackpad:

      Product ID: 0x0259
      Vendor ID: 0x05ac  (Apple Inc.)
      Version: 2.24
      Speed: Up to 12 Mb/sec
      Manufacturer: Apple Inc.
      Location ID: 0x14400000 / 3
      Current Available (mA): 1000
      Current Required (mA): 40
      Extra Operating Current (mA): 0
      Built-In: Yes
| improve this answer | | | | |
  • I concur with this.. I know my SN of my keyboard and tried searching for it within System Profiler and it simply wasn't reported anywhere. – Allan May 20 '16 at 20:46
  • That's very funny... I can find the Serial Number ok my Internal Keyboard of my MacBook... But not for USB Keyboard ... – Thomas R May 21 '16 at 9:57
  • SPI: Apple Internal Keyboard / Trackpad: Product ID: 0x0290 Vendor ID: 0x05ac (Apple Inc.) Version: 1.71 Serial Number: DQXXXXXXXXXXX Manufacturer: Apple Inc. Location ID: 0x01000000 – Thomas R May 21 '16 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .