The other day I was browsing /r/sysadmin as I usually do and found the first post that day to be pretty awesome. The post was regarding an AD health check script that emailed the status of AD services to staff with a CSV export and could port the results to an HTML file.
Here’s how I set it up.
Go here to download the script.
Export it to a location such as c:\scripts\
Right click and edit the script adding your email server and account information.
You can also disable the email report/file exports by changing the flags to false. You can use this on an internal website within an iframe or other custom
Save the vbs script and set up a scheduled task. We can’t run a VBS script directly from Task Scheduler, so I created a script that I redirected to. It looks like this: cscript “c:\dropbox\scripts\vbs-ad-health-report.v3.vbs”
Setting up a Scheduled Task in windows is a fairly easy process, so I’ll assume you understand that process, here’s how mine looks:
I set mine up for 7:50 AM every day.
Here is what the script will look like from the exported html file and within an email: