Managing Microsoft Entra ID group life cycle policies is essential for automating group expiration, renewal, and cleanup. IT administrators often need to remove outdated or unnecessary life cycle policies to maintain an organized and compliant directory. While the Remove-MgGroupLifecyclePolicy PowerShell command in Microsoft Graph allows admins to delete life cycle policies, it requires scripting expertise and manual execution.
ManageEngine ADManager Plus is an identity governance and administration solution with robust Microsoft Entra ID management and reporting features. It streamlines administrative tasks with powerful management actions and in-depth reports, reducing IT workload.
Before running the Remove-MgGroupLifecyclePolicy cmdlet, ensure the following requirements are met:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Group.ReadWrite.All"
Use the Remove-MgGroupLifecyclePolicy cmdlet in Microsoft Graph PowerShell to remove life cycle policies of Microsoft Entra ID groups. The syntax is as follows:
Remove-MgGroupLifecyclePolicy
-InputObject <IGroupsIdentity>
[-IfMatch <String>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PassThru]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Example: Remove the life cycle policy of a group
Use this Graph PowerShell command to remove life cycle policy of a Microsoft Entra ID group.
Import-Module Microsoft.Graph.Groups
Remove-MgGroupLifecyclePolicy -GroupLifecyclePolicyId $groupLifecyclePolicyId
The table below lists key parameters that can be used with the Remove-MgGroupLifecyclePolicy cmdlet to remove life cycle policies of Microsoft Entra ID groups.
| Parameters | Description |
|---|---|
| -Confirm | This you to confirm before running the cmdlet. |
| -GroupLifecyclePolicyId | This is the unique identifier of groupLifecyclePolicy. |
| -GroupID | This is the unique identifier of a group. |
| -WhatIf | This shows what would happen if the cmdlet was run. |