CLI: Get and Set Mac OS X Server Serial

You can use the serversetup tool in /System/Library/ServerSetup/ to set the serial number for a Mac OS X Server.  Provided the ServerSetup directory is your working directory you can then use the serversetup tool to configure the serial number
./serversetup -setServerSerialNumber “XSVR-105-000-N-xxx-xxx-xxx-xxx-xxx-xxx-x|Charles Edge|318″
Once the serial number has been set you can then get the serial number using the following command no matter the working directory:
/System/Library/ServerSetup/ -getServerSerialNumber

3 Comments

  • 501pdx
    June 24, 2011 - 5:11 pm | Permalink

    For 10.6.x server: sudo /System/Library/ServerSetup/serverserialnumberutil -get

  • November 21, 2011 - 2:39 am | Permalink

    Does not work on my 10.5 osx server. Here’s the error:

    ~$ /System/Library/ServerSetup/ -getServerSerialNumber
    bash: /System/Library/ServerSetup/: is a directory

    Can you tell me what I am doing wrong?

    Thanks,
    Ismael

  • November 21, 2011 - 2:48 am | Permalink

    This worked on my 10.5 OSX Server:

    /System/Library/ServerSetup/serversetup -getServerSerialNumber

  • Comments are closed.