• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Disk Quotas - R2

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Windows

View previous topic :: View next topic  
Author Message
ldoodle
Just Arrived
Just Arrived


Joined: 05 May 2005
Posts: 0


Offline

PostPosted: Tue Sep 18, 2007 2:31 pm    Post subject: Disk Quotas - R2 Reply with quote

Hi,

I am running a Storage Server 2003 R2 x64 box, and am making use of the MMC
based management for stuff like File Screening and Disk Quotas etc.

I am trying to develop an .asp page that shows users their quota status. Now
the below script kinda works, in that no errors appear, but it's not finding
any info for the specified user (in this case Joe Bloggs) and doesn't work
for any user I specify.

Is this because i'm using the MMC snap-in for Quota management and not going
through the old way of right clicking the drive in question and clicking
'Quotas', as this show no entries. If so, can the script me modified to look
at the MMC-base quotas instead. Or does something else need to be done.

Thanks/...

Code:

strComputer = "servername"
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colDiskQuotas = objWMIService.ExecQuery("Select * from Win32_DiskQuota
Where User='Win32_Account.Domain=""domainname"",Name=""Joe Bloggs""'")

   For each objQuota in colDiskQuotas
       Response.Write "Disk Space Used: " & vbTab &  objQuota.DiskSpaceUsed &
"<br />"
       Response.Write "Limit: " & vbTab &  objQuota.Limit & "<br />"
       Response.Write "Quota Volume: " & vbTab &  objQuota.QuotaVolume & "<br
/>"
       Response.Write "Status: " & vbTab &  objQuota.Status & "<br />"
       Response.Write "User: " & vbTab &  objQuota.User & "<br />"
       Response.Write "Warning Limit: " & vbTab &  objQuota.WarningLimit &
"<br />"
   Next
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Windows All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register