MobiControl Enrollment to Name Device with only last 5 Digits of the Serial Number?

Solved

Is it possible to set up the MobiControl Enrollment to Name the device with only last 5 Digits of the Serial Number? Ie. %SerialNumber% only using the last 5 digits of the serial.

a year ago
SOTI MobiControl
ANSWERS

Yes and no.

Initially: No, as there's no possibility to add a script in the enrollment rule to do that.

Finally: Yes, you can assign a Javascript (via Package or Task profile) to all enrolled devices which can grab the serial number and shorten the string then to the last digits and rename the device finally.

Take a look here: https://www.soti.net/mc/help/javascriptapi/en/index.html

TF
Trevor Francis
a year ago

Are you able to assist with what that JavaScript might look like?

MD
Matt Dermody Diamond Contributor
a year ago

Might want to check with ChatGPT or Claude or another AI tool. There are also a lot of JS resources available online. The tools are out there for you. Rafael has given you the blueprint, you just need to connect the dots. We're here on the forum to help guide but there is no obligation to write custom javascript scripting on someone's behalf. You'll end up with a much stronger grasp of how it works figuring it out for yourself. I would at least suggest you use messages or log lines to insert break points into your javascript logic so that you can see the results as you go so that you can iterate on your script until you get it exactly the way you want it. 

Solution
TF
Trevor Francis
a year ago

I was able to create a JavaScript function that got us what we needed. Thanks again for the assistance!

T
TGMOD@SOTI.net
a year ago

Hi Trevor,
 
Thanks for posting on SOTI Pulse.
 
Thank you, Rafael and Matt for responding to the post, your expertise and willingness to help are greatly appreciated.
 
We are glad to know that your issue has been resolved. If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.
 
Technical Support, SOTI Inc.