Device rename script in task scheduler.

Hello,

I've got a script to rename devices based off Custom Data in Device groups.  We want our devices to rename themselves after being moved by device relocation rules.  My question is, can I have one profile assigned to all device groups that contain the task schedule to run this script once and if it will be run anytime a device changes groups?  Or do I need to add the scheduled task to each existing device group profile?

a year ago
Android Scripting
ANSWERS
MD
Matt Dermody Diamond Contributor
a year ago

I usually have a unique Task Scheduler based Profile assigned to each sub folder set to "Run Once" to have devices renamed each time they hit a new folder. 

BR
Ben Reger
a year ago

Yes I could create a new profile for each of our business "Unit Codes" that the Custom Data uses in the rename process.  Would be less tedious than adding than adding it to the device specific sub groups under those main Unit Coded groups.  It would increase my overall number of profiles, but reduce the amount of times I'd have to apply that specific Task Scheduler profile.

MD
Matt Dermody Diamond Contributor
a year ago

If you end up with unique Profiles for each of the business units you may not even need to use Custom Data references in the rename as you could hardcode the code into each of the scripts. That would result in a unique rename script per business unit though.

BR
Ben Reger
a year ago

Seems like you need to run a Saved Script from the task scheduler, which would then require a uniquely saved script per business unit.  End up with a lot of clutter in your script library.

MD
Matt Dermody Diamond Contributor
a year ago

Yes but you'd end up with some clean auto-configured device names!

Another way would be to use the Signal policy (if your Mobicontrol version already includes it) with event "Device group changed" and assign the renaming script. This policy can be assigned to every deviuce group you want, so one rule for all.

Never used that but you can test that with a test device.

MD
Matt Dermody Diamond Contributor
a year ago

Good call! I haven't used that approach before but it's worth testing out.

C
CKMOD@SOTI
a year ago

Hi Ben,

Thanks for posting on SOTI Pulse, Thanks Matt and Rafael
for responding to the post, your expertise and willingness to help are greatly appreciated!
 
Have you had an opportunity to test the suggested solutions by Matt and Rafael and has it successfully addressed your query?
 
If not, or If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.