Saturday, June 18, 2011

Disk Quota and .net (WMI and Microsoft.DiskQuota.1)

Repost from old Blog

Today I had a con-call to talk about disk quota and how to automate the setting and reading of Quota. So i thought that I would post a little about Disk quota stuff.

There are 2 okay options.

#1 WMI (way to slow for a lot of things (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/disk_quota_provider.asp))

#2 Microsoft.DiskQuota.1

So my team needed a way to enumerate a users current quota limits and then + or - from them. WMI was very slow to do this. But DiskQuota.1 is quite fast. It is not well documented that it works on remote servers either. So I wrote a little something up.

So here is some cs (and vb.net) that has functions on how to get and set quota info with Microsoft.diskquota.1

CSharp: http://dl.dropbox.com/u/3275573/blog/QuotaFunctions.cs.txt
VB.NET: http://dl.dropbox.com/u/3275573/blog/QuotaFunctions.vb.txt

4 comments:

Amirtha rao said...

.Net is most preferred programming language among software developers all over the world. It is also considered as most trusted and effective platform to build high performing desktop or enterprise application. DOT NET Training Institutes in Chennai

mallika said...

Wonderful post. Thank you for sharing such a wonderful blog. keep updating... Web Designing Training Institute in Chennai | Web Designing Training Institute in Velachery.

kumari said...

Really I was so impressive after read your blog. your blog was very informative with "understandable manner"..
Software Testing Training in Chennai | Six Sigma Certification Training in Chennai

Rupi said...

Thanks for all your information from software languages.keep sharing
Android Training in Chennai | IOS Training Institute in Chennai | No.1 Android Training in Chennai