This post is for people who are looking to name their computers to it's serial number. The script can be run with a policy at recurring check-in. Obviously there are multiple ways to set the computer name and the jamf binary can do it as well.
If anyone wants to add in the comments what they use for naming computers, I'm sure fellow Jamf Admin's would not mind.
#!/usr/bin/env bash
# Get the Serial Number of the Machine
sn=$(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}')
# Set the ComputerName, HostName and LocalHostName
scutil --set ComputerName $sn
scutil --set HostName $sn
scutil --set LocalHostName $sn