In this Azure article, let’s discuss the syntax and usage of the Remove-AzureADDevice PowerShell command with an example of how to use this command.
This is an excellent Azure PowerShell command to remove an Azure AD device.
Below is the syntax of the Remove-AzureADDevice PowerShell command.
Remove-AzureADDevice -ObjectId <String>
Let’s discuss an example of how to use the Remove-AzureADDevice PowerShell command.
You can execute the below Azure PowerShell command to remove a specified device in your Azure Active Directory.
Remove-AzureADDevice -ObjectId a34dad44-3e2f-4aff-a84b-3027bad701b4
After executing the above PowerShell command, I got the expected output and the specified Azure AD device has been deleted successfully. You can check out the below screenshot for your reference.
To cross-check, I re-ran the Get-AzureADDevice PowerShell command and you can able to see there is no record I was having only one device, and that has been deleted successfully. See the below screenshot for your reference.
Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228 get-azureaddevice
You can also check out a video tutorial on the Remove-AzureADDevice PowerShell command.
In this Azure PowerShell article, we discussed the syntax and usage of the Remove-AzureADDevice PowerShell command along with examples of how to use this command. Thanks for reading this article !!!