I continue learning a great deal on here, I am trying to create a report I thought would be easier. But I’m getting stuck trying to figure out how to write a report that would:
A. Gather the quotas setup on file servers that run Windows 2003 and 2008R2
B. Provide an HTML or Excel report with the data. Given it’s multiple servers, I’m thinking excel might be better, perhaps 1 sheet per server?
C. Email the sheet when a scheduled task runs weekly.
I’ve been working on this for a little while now and can’t seem to get to where I need at all, which is frustrating. I know the command I need to run is: dirquota quota list
I think I need to start with a foreach loop that will accept either 1 server name or get-content where I put in the path of a text file with the server names. Then store the properties I need in an array or variable? After that I think it’s exporting the data to excel, and ideally the “sheet” in excel would be named the name of the server, and then the email portion would come in last?
Then I need these properties:
Quota Path: D:\Share\Marketing
Source Template: 300 MB Limit (Does not match template)
Quota Status: Enabled
Limit: 50.00 MB (Hard)
Used: 1.00 KB (0%)
Available: 50.00 MB
If anyone can help it would be great!