Edit

Share via


Add-EntraBetaLifecyclePolicyGroup

Adds a group to a lifecycle policy.

Syntax

Default (Default)

Add-EntraBetaLifecyclePolicyGroup

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

Description

The Add-EntraBetaLifecyclePolicyGroup cmdlet adds a group to a lifecycle policy in Microsoft Entra ID.

Examples

Example 1

Connect-Entra -Scopes 'Directory.ReadWrite.All'
$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Office365 group'"
$policy = Get-EntraBetaGroupLifecyclePolicy | Select-Object -First 1
Add-EntraBetaLifecyclePolicyGroup -GroupLifecyclePolicyId $policy.Id -GroupId $group.Id

This example adds a group to the lifecycle policy.

  • -GroupLifecyclePolicyId parameter specifies the ID of the Lifecycle Policy add to the group.
  • -GroupId parameter specifies the ID of the group add to the Lifecycle Policy.

Parameters

-GroupId

Specifies the ID of a group in Microsoft Entra ID.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GroupLifecyclePolicyId

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

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.

Inputs

System.String

Outputs

System.Object