Detecting configuration drifts using M365 DSC.

Garima Das 1,001 Reputation points
2021-06-16T11:18:47.853+00:00

Hi Experts,

I have been working on M365DSC Script. I have been using it to extract Sharepoint details and make changes in the tenant using the script. Recently I received another query where I have to send the monitoring reports whenever there are drifts observed in the configuration. I can perform the comparison, but according to the requirement, the reports need to be sent only when drifts are observed.

But as far as I have worked, I know that the reports are generated each time the assessment is done.

Do you have any idea how to differentiate whether the report has registered changes or if it is just a blank file?
Is there any exit code generated after the assessment is complete that can determine this difference?

Thanks.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,701 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,011 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,675 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,382 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-06-17T06:40:20.65+00:00

    Hi @Garima Das ,

    You could refer to this video to Monitor SharePoint Online Configuration Drifts with Microsoft365DSC:

    https://www.youtube.com/watch?v=CfY7YwonAiQ


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    If the response is helpful, please click "Accept Answer" and upvote it.