molesm Posted November 7, 2006 Posted November 7, 2006 We use a windows server 2003 r2 built in quota system, not NTFS Disk quota. Does anyone know a way of notfying users when they run low or out of disk space, we would like to use a pop-up. I know this has been discussed in previous posts, but I cnould not find any definfte solution, and most of them do not use the quots system that R2 Uses. I would appreciate any advice that you can give me
ChrisH Posted November 7, 2006 Posted November 7, 2006 There is a setting with R2 that will email the user when they are running low.
molesm Posted November 7, 2006 Author Posted November 7, 2006 Forgot to mention that none of our students have school e-mail address, hence we cannont send them e-mails, I thinik that the command option would be the best way, but I cannont get it to work
EvLPhenom Posted November 7, 2006 Posted November 7, 2006 Hey molesm, we have been looking at something like that here but as of yet we haven't implemented it because we don't want to slacken the security settings to enable the kids to run scripts ... could be messy. if you or anyone else knows of a way to do this without scripts then it would be very much appreciated. sorry its not very helpful :? cheers andy
steve Posted November 7, 2006 Posted November 7, 2006 I setup our login script to measure the disk usage of each student at login. Then display the details in a popup box. We use kixtart scripts ..... Dim $quota Dim $year Dim $restrict Dim $defprint Dim $diskspace ;defines print quota and year group based on active directory group IF InGroup("2006_07") $quota = "50" $year = "Year 7" goto yrend EndIf IF InGroup("2005_06") $quota = "100" $year = "Year 8" goto yrend EndIf IF InGroup("2004_05") $quota = "150" $year = "Year 9" goto yrend EndIf IF InGroup("2003_04") $quota = "250" $year = "Year 10" goto yrend EndIf IF InGroup("2002_03") $quota = "500" $year = "Year 11" goto yrend EndIf IF InGroup("2001_02","WSELC_2001_02") $quota = "200" $year = "Post 16" goto yrend EndIf IF InGroup("2000_01","1999_00","1998_99","WSELC_2000_01","WSELC_1999_00") $quota = "300" $year = "Post 16" goto yrend EndIf IF InGroup("ICTStaff") $quota = "unlimited" $year = "ICT Staff" goto yrend EndIf IF InGroup("staff") $quota = "100" $year = "Staff" goto yrend EndIf :yrend ;runs a prog that calculates the space used in the users home folder (z:) and outputs to txt file Shell "%COMSPEC% /C \\server\folder\dirsize.exe z:\* >%TEMP%\dirsize.txt" ;reads the correct line from the prog output txt file If Exist ("%TEMP%\quota.txt") ;check if file exists Del "%TEMP%\quota.txt" ; del if file exits EndIf $ = Open (2,"%TEMP%\quota.txt",5) $ = Open (1, "%TEMP%\dirsize.txt") $Line = ReadLine (1) Do If InStr ($Line,"Total file size (MB):") $NewLine = Trim (SubStr($Line,22,8)) $ = WriteLine (2, $NewLine + @CRLF) EndIf $Line = ReadLine (1) Until @ERROR = -1 $ = Close (1) Del "%TEMP%\dirsize.txt" $ = Close (2) Open (3, "%TEMP%\quota.txt", 2) $diskspace = Readline (3) ;gets restrictions as stored in users full name in AD IF @FullName = "" $restrict = "no resrictions on your account" Else $restrict = @Fullname EndIf ;displays message box MESSAGEBOX ("@userid - $year @CRLF@CRLFLogged on to computer: @wksta@CRLF@CRLFDefault Printer: $defprint @CRLF@CRLFDisk space used: $diskspace of $quota MB disk quota available@CRLF@CRLFRestrictions: $restrict@CRLF@CRLFDate: @Day @MDayNo @Month @Year @TIME", "Logon Information", 4160, 10) dirsize.exe is a freeware tool from Tools4ever (they call it T4eDirSize)
apeo Posted November 8, 2006 Posted November 8, 2006 I thinik that the command option would be the best way, but I cannont get it to work Has anyone actually seen this option being used? As best I can tell it will run a script centrally, and if you wanted to inform the user that the quota has exceeded, you will need the script to send a message or something to the user remotely... thats assuming the detection of quota violations are instant and not scheduled. Is that right?
molesm Posted November 8, 2006 Author Posted November 8, 2006 tanks for your input Steve, I am fairley new to scripts, but your script to me does not seam to be using the FSRM of Win server 2003 r2, apeo I think that you are tight but not sure how to script this,a nd every time I hve tried to create a script I get an error message when I try to assign it
Ric_ Posted November 8, 2006 Posted November 8, 2006 I started a thread at http://edugeek.net/index.php?name=Forums&file=viewtopic&t=4772 a few days ago and got a script together that nearly worked. The problem is that WSH has certain security built into it that prvents the key method from running If anyone can fettle that script so that a regular user can run, please let me know. BTW - Don't know about the R2 command thingy but you don't have to enable the Messenger service or anything daft like that do you?
apeo Posted November 8, 2006 Posted November 8, 2006 apeo I think that you are tight Thats abit harsh aint it?? @molesm: If I have time I may give it a bash but what is the error you are getting? @Ric_: Thanks for your script, but just to clarify it is a login script yes and if that is the case it will only display the info when they login.
molesm Posted November 8, 2006 Author Posted November 8, 2006 The error is the command specifed is under an inscure folder path This is beacsue builtin\users has perrmsions to it on the DC
apeo Posted November 8, 2006 Posted November 8, 2006 You may have done this already but i have to ask... have you tried removing users from the acl on that folder?
steve Posted November 8, 2006 Posted November 8, 2006 The script I've shown doesn't use any of R2's quota system. I've predefined the quota limits per year group, and the script goes off and calculates the space used. I looked at a few alternatives, but this at the time was the best i could come up with. One problem is that the drivespace reported by windows still referes to the entire space available - not the remaining quota. There is a command line tool within R2: from server :\>dirquota quota freespace /path:\\share\userfolder This gives the users % usage. Only trouble is I've only been able to run this on the server, and its extremely slow.
apeo Posted November 8, 2006 Posted November 8, 2006 @steve: What are you proposing to use dirquota for?
g60dave Posted January 1, 2007 Posted January 1, 2007 Did you ever find the solution you wanted for this? Im in the exact same boat Thanks David
mac_shinobi Posted January 1, 2007 Posted January 1, 2007 I started a thread at http://edugeek.net/index.php?name=Forums&file=viewtopic&t=4772 a few days ago and got a script together that nearly worked. The problem is that WSH has certain security built into it that prvents the key method from running If anyone can fettle that script so that a regular user can run, please let me know. BTW - Don't know about the R2 command thingy but you don't have to enable the Messenger service or anything daft like that do you? I think you would need the messenger service enabled in order to send messages to remote machines, unless you know of some other way aside from replying on a 3rd party app. Surely when you run a logon script its run with system privs so it shouldnt matter about if its a student or admin logging on ? I must be missing something here
Ric_ Posted January 2, 2007 Posted January 2, 2007 Surely when you run a logon script its run with system privs so it shouldnt matter about if its a student or admin logging on ? I must be missing something here Login scripts run with slightly elevated user priviledges. Only startup/shutdown scripts run with system priveldges.
mac_shinobi Posted January 2, 2007 Posted January 2, 2007 so why not just make it a startup script so that it has system privs and see if that helps with that ?
Ric_ Posted January 3, 2007 Posted January 3, 2007 so why not just make it a startup script so that it has system privs and see if that helps with that ? Because it then wouldn't br running at logon.... hence no knowledge of a particular user and no ability to prompt the user to delete files.
mac_shinobi Posted January 3, 2007 Posted January 3, 2007 Any chance you can post your wsh example so I can have a look at it and what happens or what error message do you get ( If any ) with this wsh script. I'm guessing its obviously something to do with the end users permissions ie with being a student or w/e.... Just so I can see what your doing exactly.
Ric_ Posted January 3, 2007 Posted January 3, 2007 See http://edugeek.net/index.php?name=Forums&file=viewtopic&t=4772
molesm Posted January 3, 2007 Author Posted January 3, 2007 Ric_, doesn't that forum just apply to NTFS Quotas and not R2 quotas, also the remiang disk space is not that good as it sometimes shows the entire HDD rather than their own space molesm
Ric_ Posted January 3, 2007 Posted January 3, 2007 @molesm: Yes it does just apply to NTFS quotas... R2 Quotas will happily send an email to the user which is sufficient.
molesm Posted January 3, 2007 Author Posted January 3, 2007 Yes Ric, but as I mentioed eariler we do not have any handy exchange servers, or other student e-mail addreess, yet although there could be plans in the future, which is why I would like a pop-up messages or bubbles of some kind. molesm
Teth Posted April 17, 2007 Posted April 17, 2007 Just thought I'd bump this post and see if anyone has had any brainwaves on the subject since. I just implimented a new R2 based file server over the easter 'break' there and I finished off tweaking year group based quotas today. I'm now at the point of finding a way to notify users of they're quota. I used to be happy enough that they could see they're free space by looking at they're mapped network drive but with R2 quotas its reporting the full volume free space not the quota space like it used to with NTFS quotas. I'm wondering about using the execute command option coupled with the % limit events you can set in R2. Obviosuly net send would be an option but I don't need to tell any of you how much I loath the idea of enabling messenger service on client PCs. Has anyone thought of another way maybe a 3rd party secure messenging client that could be run on server and client that is accessable from the command line?
steve Posted April 17, 2007 Posted April 17, 2007 I found this software Me.Ri.Quota Not tried it myself though
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now