Remove-AzureADPolicy

In this Azure PowerShell article, we will discuss the syntax and usage of the Remove-AzureADPolicy PowerShell command with examples of how to use this command.

Remove-AzureADPolicy

In case, you wish to delete any unwanted Azure AD policy, you can use this command.

Syntax

Below is the syntax of the Remove-AzureADPolicy PowerShell command.

Remove-AzureADPolicy
 -Id <String>

Let’s discuss an example of how to use the Remove-AzureADPolicy PowerShell command.

Example:

You can execute the below PowerShell command to delete a specified Azure AD policy.

Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
Remove-AzureADPolicy -Id 8a3c7b96-ef63-4419-864d-fb0bc42129e1

After executing the above PowerShell command, I got the expected output below

PS C:\WINDOWS\system32> Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2d549228
Remove-AzureADPolicy -Id 8a3c7b96-ef63-4419-864d-fb0bc42129e1

Account                   Environment TenantId                             TenantDomai
                                                                           n          
-------                   ----------- --------                             -----------
fewlines4biju@hotmail.com AzureCloud  5d9d690a-0310-474d-ae8b-42df2d549228 fewlines...

You can check out the same output as below.

Remove-AzureADPolicy

To make sure that the policy has been deleted successfully, I have executed the Get-AzureADPolicy, and You can able to see I didn’t get any record. So the Azure AD policy has been deleted successfully. Check out the below screenshot for your reference.

Remove-AzureADPolicy PowerShell

Related article:

Final Thoughts

Well, in this article, we discussed the syntax and usage of the Remove-AzureADPolicy PowerShell command with an example of how to use the Remove-AzureADPolicy command.