Quota Management on Windows Server 2008 R2
-
Thursday, February 21, 2013 3:02 PM
Hi,
I intend to use FSRM soom but currently , I have "ordinary" quota management enabled. I would like to export the users and the disk space used by them. I do not want to type each name . Is there any way to export to text or CSV the list of users and space used by them ?
- Edited by scuba19 Thursday, February 21, 2013 3:02 PM
All Replies
-
Tuesday, February 26, 2013 6:18 AMModerator
Hi,
Thank you for your question.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Thank you for your understanding and support.
Regards,
Yan Li
If you have any feedback on our support, please click here .
Cataleya Li
TechNet Community Support -
Thursday, February 28, 2013 12:10 PM
Hi ,
If you said the "ordinary" quota management is the disk quota in Local Disk Propeties, then we may not export as txt. You can use the following script.
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems1 = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems1
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & objItem.Name
WScript.Echo "=========================================="
Next
Set colItems3 = objWMIService.ExecQuery("SELECT * FROM Win32_DiskQuota", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems3
WScript.Echo "User: " & objItem.User
WScript.Echo "QuotaVolume: " & objItem.QuotaVolume
WScript.Echo "DiskSpaceUsed: " & objItem.DiskSpaceUsed
WScript.Echo "Limit: " & objItem.Limit
WScript.Echo "Status: " & objItem.Status
WScript.Echo "WarningLimit: " & objItem.WarningLimit
WScript.EchoNext
Save this as diskquota.vbs and run the following command:
cscript diskquota.vbs
Or the following command line if you want get the txt result.
cscript diskquota.vbs >quota.txt
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
- Edited by Aaron Hu -MSFT Thursday, February 28, 2013 12:10 PM
- Marked As Answer by scuba19 Friday, March 08, 2013 4:31 PM


