3

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 ?

3
  • 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
    Commented May 20, 2016 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
    Commented May 28, 2016 at 20:47
  • Afraid you're probably out of luck then.
    – JMY1000
    Commented May 28, 2016 at 22:09

1 Answer 1

3

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
3
  • 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
    Commented May 20, 2016 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
    Commented May 21, 2016 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
    Commented May 21, 2016 at 9:57

You must log in to answer this question.

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