Company News

Rename Device in Azure AD and Intune

June 7, 2017

Scenario

You joined a device to Azure AD then later on renamed it.  The display name is never updated in Azure AD or Intune.  The resolution?  Change the display name using PowerShell of course!

Steps

  • If you don’t already have it get the Azure AD PowerShell module here
  • Once the module is installed open PowerShell and connect to Azure AD:

$credential = Get-credential

Connect-AzureAD -Credential $credential

  • Once connected get the objectID of the device you need to update:

Get-AzureADDevice (this will display a list of all Azure joined devices and their objectID’s)

  • Using the objectID of the device you wish to update type the following:

Set-AzureADDevice -objectID “objectID of device” -displayname “new display name”

  • Confirm changes made in Azure AD and Intune
  • Confirm via powershell

Get-AzureADDevice -objectID “objectID of device”

Done!

 

7 Responses

  1. skuffle says:

    Thanks, but why is this necessary…
    Microsoft, what is wrong with you?

  2. Rob Nicholson says:

    This is great thanks but what if you don’t know the DeviceId of the device? I’ve run this in a laptop where the name was the default DESKTOP-XXXXXX but it was renamed for LAPTOP045 so we have no record of the original name. Is there a way to find the DeviceId of the current device?

    • Rob Nicholson says:

      Just answering my own question, I found a bit of a hack to dig out the current device ID by querying the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CloudDomainJoin\JoinInfo area of the registery. There is a subkey in there that is the device ID.

  3. skuffle says:

    I used this command to change the display names of Windows smartphones in the devices list in Intune. But 24 hrs later the list still shows the old names (the ones with the timestamp).

    Get-AzureDDevice shows the new names.

    Why doesn’t Intune show the new names?

    • stellark says:

      I would check what the Device displays as in Azure AD and confirm it is what you intended it to be. It seems that recently Intune (old portal) and Azure Intune (new portal) are independent of each other. For a time they were hybrid during migration. This is my thought on why the new device name will not show up in the old portal.

  4. skuffle says:

    Thanks, but I am using the new Azure Intune. I haven’t looked at the old Intune site at all.

Leave a Reply

Stephanie Kahlam

Stephanie Kahlam

 

Subscribe via Email

Categories

Powered by...

itgroove Corporate Profile
Connect With Us