Apply quotas to multiple folders - Server 2008R2

rookie_b used Ask the Experts™
How can I use dirquota.exe to apply quotas to a list of folders? I am using Server 2008R2, powershell FSRM cmdlets are not supported.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AlexA lack of information provides a lack of a decent solution.

You'd need to script it. Without further information I can't help you. So folder locations, what size you want it, are the folders all in the same location, is it home drives, is it shared drives etc etc etc.



Hello Alex, thank you for responding!

We have about 100 folders D:\shared\foldername, and would like to apply custom quota of around 5% + current usage. So, my first step would be to get current usage somehow, probably powershell, then multiply that per 1.05 in an Excel spreadsheet, then use "dirquota  quota add /PATH:d:\shared\Foldername /LIMIT:[n]GB" for each folder, and use excel to populate path and limit. Then I will take all resulting 100 lines and just paste them in a CMD file and run them....?

Is there a more elegant to achieve this with an actual script?
I just used individual dirquota commands genertated in excel. The one annoyance was I had to also  multiply TB and GB by 1024 and use GB and MB respectively, as dirquota does not support decimal. So I'd have to turn  1.05TB into  1075GB, otherwise the 0.5TB increase would be lost in truncation.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial