Domain Controller Health script remotely (Powershell)

I use this script to run a few commands I find myself running on my DCs on a regular basis. I wanted a solution I could run from my client machine and output the results to a log file. Below is what I cam up with, it will run dcdiag, dcdiag /v, repadmin /showrepl or repadmin /replsummary depending on which you choose. It will output the results to c:\server_logs\dcname+date.log.

I have this setup to run as a scheduled task every couple days so all I have to do is take a look ot the log files.

Enjoy

Leave a Reply