Hi,
Thank you for posting in Microsoft Q&A forum.
Per my experience, it is possible to use Script Runbook on Azure Automation to rename Android devices in Intune. You can use the "Rename device" action in the Intune admin center to change the device name, and then use Azure Automation to automate this process on a schedule.
First, you will need to create a PowerShell script to rename the device. Here is an example script that you can modify to your needs:
# Connect to Intune
Connect-AzureAD
# Get device by ID
$device = Get-AzureADDevice -ObjectID "<Device Object ID>"
# Rename device
Set-AzureADDevice -ObjectID $device.ObjectID -DisplayName "<New Device Name>"
Replace <Device Object ID> with the ID of the device you want to rename, and <New Device Name> with the new name you want to give to the device.
Save this script to a file in your Azure Automation account.
Next, create a new Runbook in your Automation account and paste the script into the editor. You can then set a schedule for the Runbook to run on a regular basis, such as daily or weekly.
When the Runbook runs, it will connect to Intune, retrieve the device you specified, and rename it to the new name you specified. You can monitor the status of the Runbook and view any output or errors in the Azure portal.
References:
Microsoft: Rename a device in Intune
Thanks for your time. Have a nice day!
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.