Remove-EntraDevice
Deletes a device.
Syntax
Remove-EntraDevice
-DeviceId <String>
[<CommonParameters>]
Description
The Remove-EntraDevice
cmdlet removes a device from Microsoft Entra ID.
The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator.
Examples
Example 1: Remove a device
Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All'
$Device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'"
Remove-EntraDevice -DeviceId $Device.ObjectId
This command removes the specified device.
Parameters
-DeviceId
Specifies the object ID of a device in Microsoft Entra ID.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |