Powershell to update Intune DevicemanagementName

Ed K 21 Reputation points
2021-12-23T22:34:08.213+00:00

Hi everyone,

I'm looking to use powershell to modify some Android device Management Names in Intune. I've managed to figure out how to find the device I want to change using the Get-IntuneManagedDevice.

$Device=Get-IntuneManagedDevice |Where-Object {$_.SerialNumber -match $Serial}

but I cannot figure out how to write to Intune and modify the DeviceManagementName

I'm sure it's a super simple code, but I seem to be an idiot. Can someone show me how to write that change?

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Intune | Configuration
Microsoft Security | Microsoft Graph
{count} votes

Answer accepted by question author
  1. Timmy Andersson 411 Reputation points MVP
    2021-12-26T08:45:10.827+00:00

    Thanks for posting your question,

    You are on the right track, with the current line of powershell you have there you are getting data from Graph to match with the serial number you have in your variable.
    The next step would be to update the information to set a new management name on the device and it can be done with the following example:

    Update-IntuneManagedDevice -managedDeviceId $device.id -managedDeviceName "New management device name"
    

    hope this helps.


1 additional answer

Sort by: Most helpful
  1. Ed K 21 Reputation points
    2022-01-04T19:52:01.107+00:00

    Thanks TimmyAnderson! Sorry for the delay.. i stepped away for the holidays. Your update command worked for me. Root beers on me when I get a chance. :)

    Now to figure out how to add it to a group. :)

    0 comments No comments

Your answer

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