Report system hardware and software configuration. More information: https://ss64.com/osx/system_profiler.html.
system_profiler -xml > MyReport.spx
system_profiler SPHardwareDataType
system_profiler SPHardwareDataType|grep "Serial Number (system)" | awk '{ print $4 }'