How to use the Remove-AzureADDevice cmdlet to remove a device from Azure Active Directory (AD).
Remove-AzureADDevice
-ObjectId <String>
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
The Remove-AzureADDevice cmdlet removes a device from Azure Active Directory (AD). Example:
Remove-AzureADDevice -ObjectId "99a1915d-298f-42d1-93ae-71646b85e2fa"
- Connect to the Devices menu blade

2. Select the device you want to remove, get the device’s Object ID.

3. Run a Windows PowerShell using an administrator account.
4. Connect to Azure AD using the Connect-AzureAD command.
The Connect-AzureAD cmdlet connects an authenticated account to use for Azure Active Directory cmdlet requests. You can use this authenticated account only with Azure Active Directory cmdlets.
Connect-AzureAD
[-AzureEnvironmentName <EnvironmentName>]
[-TenantId <String>]
[-Credential <PSCredential>]
[-AccountId <String>]
[-LogLevel <LogLevel>]
[-LogFilePath <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]


5. Enter the Remove AzureADDevice command
Example:
Remove-AzureADDevice -ObjectId "99a1915d-298f-42d1-93ae-71646b85e2fa"


6. Reboot the device.
Further reading: Remove-AzureADDevice
Leave a Reply