Remove-EntraLifecyclePolicyGroup

Removes a group from a lifecycle policy.

Syntax

Remove-EntraLifecyclePolicyGroup
      -GroupId <String>
      -GroupLifecyclePolicyId <String>
      [<CommonParameters>]

Description

The Remove-EntraLifecyclePolicyGroup cmdlet removes a group from a lifecycle policy in Microsoft Entra ID.

Examples

Example 1: Remove lifecycle policy group

Connect-Entra -Scopes 'Directory.ReadWrite.All'
$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'"
$policy = Get-EntraLifecyclePolicyGroup -Id $group.Id
Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId $policy.Id -GroupId $group.Id

Value
-----
True

This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId.

  • -GroupLifecyclePolicyId parameter specifies the lifecycle policy object ID.
  • -GroupId parameter specifies the ID of Office365 group.

Parameters

-GroupId

Specifies the ID of a group in Microsoft Entra ID.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-GroupLifecyclePolicyId

Specifies the ID of the lifecycle policy object in Microsoft Entra ID.

Type:System.String
Aliases:Id
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

Outputs

System.Object