1. Create a directory called c:\scripts\Diskspace_report
2. Create a text file called list.txt. Edit it and enter all servers you wish to be included in the disk space report (using the FQDN)
3. Download diskspace.ps1 and save in the c:\scripts\Diskspace_report directory.
3a. Edit the diskspace.ps1 using notepad to set your SMTP server, set the To and From addresses and to modify the free space threshold % as required.
4. Download diskspace.bat and save in the c:\scripts\Diskspace_report\ directory
Incase your browser/firewall blocks downloading of this bat file, it runs: powershell.exe -command "&'C:\Scripts\Diskspace_report\diskspace.ps1' 'C:\Scripts\Diskspace_report\list.txt'"
5. Create a scheduled task as required and set the action to run c:\scripts\Diskspace_report\diskspace.bat
If some servers listed in list.txt do not show up on the email report, it may be Windows Firewall is blocking WMI requests. See my blog post on how to allow this.