Script for system preferences

Hi guys I’m new to scripting and need some help. I’m using apple remote desktop here at work. I want to get the serial number of a computer and put it into one of the 4 text fields of the apple remote desktop / access privledges window. Thanks in advance.

You can use this script to a machines serial number, I don’t have ARD so I can’t help with that part.

set x to do shell script “ioreg -l | grep serial-number | awk ‘{print $4}’ | cut -c18-25”
set y to do shell script “ioreg -l | grep serial-number | awk ‘{print $4}’ | cut -c3-5”
set s to x & y
display dialog s