076772fc-6412-430e-97ee-c4a7c0028bc1
This script will run and end in error if DCDiag reports warnings or errors.
As an end-user reporting program, dcdiag is a command-line tool that encapsulates detailed knowledge of how to identify abnormal behavior in the system. Dcdiag displays command output at the command prompt. On e healthy domain controller DCDiag should not report any warning or error.
More information: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc731968(v=ws.11)