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?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,911 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,419 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,756 questions
{count} votes

Accepted answer
  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