John Rudy
John Rudy

Reputation: 37850

How can I query NTFS disk quotas in C#?

I need to be able to find, for all users on a given remote machine, those users' disk quotas and actual disk usage. I need to be able to do this reporting in a C# application. (Well, technically a DLL plugin for an app I've already built; but that's irrelevant here.)

Upvotes: 2

Views: 2348

Answers (1)

Lucero
Lucero

Reputation: 60190

The WMI class is Win32_DiskQuota. Edit: I found a VB.NET sample which may help you.

Or you can try to do this using P/Invoke (link goes to the P/Invoke wiki, where you may find some of the signatures). A pointer to start with quotas is the following CodeProject article: http://www.codeproject.com/KB/system/DiskQuota.aspx

Upvotes: 3

Related Questions