Detecting configuration drifts using M365 DSC.

Garima Das 1,061 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.

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.