How to rename the computer in bulk via Intune using PowerShell script or any other way as all those devices are managed via Intune?

Vinod Survase 4,741 Reputation points
2024-01-01T10:11:12.77+00:00

How to rename the computer in bulk via Intune using PowerShell script or any other way as all those devices are managed via Intune?

I have a requirement to rename the device from default name to something like few unique characters and then device serial number for identification via MS Intune as we have to manage and do all the management of the device via Intune and those are corporate devices.

For example: ABC-SERIALNUMBER : ABC-0123456789

So how we can do this via Intune with script or any other way?

Microsoft Intune Security
Microsoft Intune Security
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
417 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,893 questions
Microsoft Intune Application management
Microsoft Intune Application management
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Application management: The process of creating, configuring, managing, and monitoring applications.
941 questions
Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,360 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,053 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Crystal-MSFT 48,591 Reputation points Microsoft Vendor
    2024-01-02T01:06:27.78+00:00

    @Vinod Survase, Thanks for posting in Q&A. To rename devices in bulk via Intune, you can use the Bulk Device Actions feature. This feature uses the same rules as renaming a single device. You can try the name format like ABC-{{serialnumber}}

    User's image

    https://video2.skills-academy.com/en-us/mem/intune/remote-actions/device-rename#bulk-rename-devices

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


  2. Crystal-MSFT 48,591 Reputation points Microsoft Vendor
    2024-01-03T03:05:25.77+00:00

    @Vinod Survase, Thanks for the reply. Autopilot profile has a setting name "Apply device name template" to set the name template. For new devices, you can consider Autopilot enrollment. The device name will changed the template format when it enrolls into Intune.

    User's image

    https://video2.skills-academy.com/en-us/autopilot/profiles

    For existing devices, it the above action is not what you want and I think use PowerShell script to do this is also OK. Here is a PowerShell script I find for your refence:

    $serialNumber = (Get-WmiObject Win32_BIOS).SerialNumber

    $computerName = "ABC-$serialNumber"

    Rename-Computer -NewName $computerName

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.