Export-M365DSCDiagnosticData¶
Description¶
Collects DSC verbose logs, M365DSC event log entries, PowerShell and OS details, and LCM information. Optionally anonymizes selected values before packaging the output.
Output¶
This function does not generate any output.
Parameters¶
| Parameter | Required | DataType | Default Value | Allowed Values | Description |
|---|---|---|---|---|---|
| ExportFilePath | True | String | Specifies the destination zip file path. | ||
| NumberOfDays | False | UInt32 | 7 | Specifies how many days of logs should be included. | |
| Anonymize | False | SwitchParameter | Indicates that sensitive values should be anonymized in exported artifacts. | ||
| Server | True | String | Specifies the server value to replace during anonymization. | ||
| Domain | True | String | Specifies the domain value to replace during anonymization. | ||
| Url | True | String | Specifies the URL value to replace during anonymization. |
Examples¶
-------------------------- EXAMPLE 1 --------------------------
Export-M365DSCDiagnosticData -ExportFilePath C:\Temp\DSCLogsExport.zip -NumberOfDays 3
-------------------------- EXAMPLE 2 --------------------------
Export-M365DSCDiagnosticData -ExportFilePath C:\Temp\DSCLogsExport.zip -Anonymize -Server spfe -Domain contoso.com -Url sharepoint.contoso.com