Remove-EntraPolicy
Removes a policy.
Syntax
Default (Default)
Remove-EntraPolicy
-Id <String>
[<CommonParameters>]
Description
The Remove-EntraPolicy
cmdlet removes a policy from Microsoft Entra ID. Specify Id
parameter to remove a specific policy.
Examples
Example 1: Remove a policy
Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration'
$policy = Get-EntraPolicy | Where-Object { $_.DisplayName -eq 'Microsoft User Default Recommended Policy' }
Remove-EntraPolicy -Id $policy.Id
This command removes the specified policy from Microsoft Entra ID.
-Id
- specifies the ID of the policy you want to remove.
Parameters
-Id
The Id of the policy you want to remove.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.