Devrename with custom property

M
MetroMRA
METROSELSKABET I/S

Hi

I'm trying to rename some of our devices with the "devrename" command.

I would like to rename the devices with a text + a custom property field from LDAP.

Unfortunatly I can't get it to work.

I've tried with other fields like %ENROLLMENT_USERNAME% and so on and it works fine.

But I want a Custom Property field being used instead.

The Custom Property field is the "Pager" attribute in AD

5 years ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan Diamond Contributor
5 years ago

Try using the macro %CustomAttr:Pager% in your script.

M
MetroMRA
5 years ago

That did not do anything.

But if I use %CustomAttr:Pin% where Pin is a Custom attribute that we have manually set it works.

If I use the "Pager" it just ignores it.

RC
Raymond Chan Diamond Contributor
5 years ago (edited 5 years ago)

I thought you meant  "Custom Attribute" when you said "Custom Property field".  

If not, what exactly did you mean by the term  "Custom Property field"?  Could you show screenshot on where you see the term?  On what device platform and what device brand/model?

M
MetroMRA
5 years ago (edited 5 years ago)

It's SOTI mobicontrol 15.1.2

It's a field under global settings - directory service

RC
Raymond Chan Diamond Contributor
5 years ago

I see what you meant.  I don't think you can refer to that item in your script command.  You can ask Soti support team to offciically  confirm whether there is any alternative.

If you have only one or a very small number of different value(s) for that "Custom Attribute 3" property to be assigned to your devices, then one possible workaround is to add a MobiControl custom attribute (say "ca3"), assign proper value to each device (e.g. by importing the value of large number of device in bulk via a .CSV file), and use the macro  %CustomAttr:ca3% in your script.

TD
Tim De Jonge
4 years ago

Hi

I'm trying to rename some of our devices with the "devrename" command.

I would like to rename the devices with a text + a custom property field from LDAP.

Unfortunatly I can't get it to work.

I've tried with other fields like %ENROLLMENT_USERNAME% and so on and it works fine.

But I want a Custom Property field being used instead.

The Custom Property field is the "Pager" attribute in AD

Hi Metroma,

could you please explain how you succeeded in renaming the device with the custom-attribute

I would like to rename my devices with the shop number included which is a custom attribute...

So I thought with the script devrename SHOP-%CustomAtrr:ShopNr%.  it should work..

but soti won't execute, missing ; before statement.   it says.. :-(

RC
Raymond Chan Diamond Contributor
4 years ago

Is there any typo in your post or in your script?

Did you use

   devrename SHOP-%CustomAtrr:ShopNr%

or

   devrename SHOP-%CustomAttr:ShopNr%

?

The latter script should work fine.

Also, please make sure the custom attribute you add has been configured to have value propagated to your devices.

It should be noted that some specific device agent binaries have been found not properly receiving any custom attribute value.  If you need any feature that relies on using custom attribute(s), you should avoid using such device agent version/build.

TD
Tim De Jonge
4 years ago

Hi Chan,

where's the difference ??? sorry can't see it...

   devrename SHOP-%CustomAtrr:ShopNr%

or

   devrename SHOP-%CustomAttr:ShopNr%

?

Below the script we're trying to use....

RC
Raymond Chan Diamond Contributor
4 years ago

For the script type, select "Legacy" rather than "Javascript".