4 AADMSGroupLifecyclePolicy
Yorick Kuijs редактировал(а) эту страницу 2021-01-29 16:45:21 +01:00

# AADMSGroupLifecyclePolicy

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Only valid value is 'Yes'. Yes
GroupLifetimeInDays Required UInt32 The number of days a group can exist before it needs to be renewed.
ManagedGroupTypes Required String This parameter allows the admin to select which office 365 groups the policy will apply to. 'None' will create the policy in a disabled state. 'All' will apply the policy to every Office 365 group in the tenant. 'Selected' will allow the admin to choose specific Office 365 groups that the policy will apply to. All, None, Selected
AlternateNotificationEmails Required StringArray[] Notification emails for groups that have no owners will be sent to these email addresses.
Ensure Write String Specify if the Azure AD Groups Lifecycle Policy should exist or not. Present, Absent
GlobalAdminAccount Write PSCredential Credentials of the Azure Active Directory Admin
ApplicationId Write String Id of the Azure Active Directory application to authenticate with.
TenantId Write String Id of the Azure Active Directory tenant used for authentication.
CertificateThumbprint Write String Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.

AADMSGroupLifecyclePolicy

Description

This resource configures an Azure Active Directory Group Lifecycle Policy (e.g. Expiration).

Azure AD Permissions

To authenticate via Azure Active Directory, this resource required the following Application permissions:

  • Automate
    • None
  • Export
    • None

NOTE: All permisions listed above require admin consent.

Examples

Example 1

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $credsGlobalAdmin
    )
    Import-DscResource -ModuleName Microsoft365DSC

    node localhost
    {
        AADMSGroupLifecyclePolicy GroupLifecyclePolicy
        {
            AlternateNotificationEmails = @("john.smith@contoso.com");
            Ensure                      = "Present";
            GlobalAdminAccount          = $credsGlobalAdmin;
            GroupLifetimeInDays         = 99;
            IsSingleInstance            = "Yes";
            ManagedGroupTypes           = "Selected";
        }
    }
}