Hint. Note that you are likely to encounter warning events when running DcDiag tests remotely. Tests such as SystemLog will fail unless you run dcdiag.exe locally on a domain controller.
As mentioned earlier, DCDiag can be used to test DNS as well. We do this by using the /test: switch. DNS test can only be ran by running dcdiag.exe locally on a domain controller. You cannot mix /test:dns with the /s: switches.
In this example, we used the Invoke-Expression cmdlet to run the dcdiag.exe command with the /test:DNS parameter to run the DNS tests and the /v parameter to provide verbose output. Of course, we can replace /test:DNS with any other DCDiag test we want to run. Alternatively, we use the Invoke-Command cmdlet to run DCDiag on a remote computer.
df19127ead