New-EntraGroupLifecyclePolicy
Creates a new groupLifecyclePolicy.
Syntax
New-EntraGroupLifecyclePolicy
-ManagedGroupTypes <String>
-GroupLifetimeInDays <Int32>
-AlternateNotificationEmails <String>
[<CommonParameters>]
Description
Creates a new groupLifecyclePolicy in Microsoft Entra ID.
Examples
Example 1: Creates a new groupLifecyclePolicy
Connect-Entra -Scopes 'Directory.ReadWrite.All'
New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes 'Selected' -AlternateNotificationEmails 'example@contoso.com'
Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes
-- --------------------------- ------------------- -----------------
aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected
This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to example@contoso.com for groups without owners.
-GroupLifetimeInDays
parameter specifies the number of days a group can exist before it needs to be renewed.-ManagedGroupTypes
parameter allows the admin to select which office 365 groups the policy applies to.-AlternateNotificationEmails
parameter specifies notification emails for group.
Parameters
-AlternateNotificationEmails
Notification emails for groups without owners are sent to these email addresses, separated by a ';'.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GroupLifetimeInDays
The number of days a group can exist before it needs to be renewed.
Type: | System.Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManagedGroupTypes
This parameter allows the admin to select which Office 365 groups the policy applies to. 'None' creates the policy in a disabled state. 'All' applies the policy to every Office 365 group in the tenant. 'Selected' allows the admin to choose specific Office 365 groups to which the policy applies.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object