Forum Discussion
LUCA NAVIGLIO
Aug 06, 2025Copper Contributor
Can't add device member in Static Security Entra Group with powershell
Hi, With Graph, I want to add some device members in a static security Entra group using it to deploy some certificates with Intune. I do it with following command: New-MgGroupMember -GroupId $gr...
Aug 12, 2025
This does work.
New-MgGroupMember -GroupId XYZ -DirectoryObjectId (Get-MgDevice -Filter "displayName eq 'COMPUTERNAME' ").Id
It queries using Graph for the device ID in the process using the display name of the device.