Skip to content

Split-M365DSCConfiguration

Description

This function splits a large M365DSC configuration file into smaller files based on size and resource count limits.

Output

This function does not generate any output.

Parameters

Parameter Required DataType Default Value Allowed Values Description
Path True String The path to the M365DSC configuration file to split.
OutputFolder False String The folder where the split configuration files will be saved. Defaults to the same folder as the input file.
MaxFileSizeMB False Double 3 The maximum size (in megabytes) for each split configuration file. Default is 3 MB.
MaxResources False Int32 0 The maximum number of resources per split configuration file. Default is 0 (no limit).

Examples

-------------------------- EXAMPLE 1 --------------------------

Split-M365DSCConfiguration -Path 'C:\Configs\M365TenantConfig.ps1' -OutputFolder 'C:\Configs\Split' -MaxFileSizeMB 2 -MaxResources 50 This example splits the 'M365TenantConfig.ps1' file into smaller files, each with a maximum size of 2 MB and a maximum of 50 resources, saving them in the 'C:\Configs\Split' folder.