New-EntraGroupLifecyclePolicy
Creates a new groupLifecyclePolicy.
Syntax
Default (Default)
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 ';'.
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 |
-GroupLifetimeInDays
The number of days a group can exist before it needs to be renewed.
Parameter properties
Type: | System.Int32 |
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 |
-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.
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 |
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.