This blog is by design...

Tuesday, March 14, 2006

AD Exchange Mailbox Quota Report

The following vbscript will generate a report of all mailbox enabled users in Active Directory who have the 'Use mailbox store defaults' tickbox UN checked. It will also give you the value, if any, that is set in the 'Issue warning at (KB)' field and the 'Prohibit send at (KB)' fields. Enjoy!

'******************************************************
Set objRootDSE = GetObject("LDAP://rootDSE")
strDomain = "LDAP://"& objRootDSE.Get("defaultNamingContext")

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOutputFile=objFSO.CreateTextFile("c:\MBQuotas.txt",True)


Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

objCommand.CommandText = "<"& strDomain &">;"& _
"(objectCategory=user)" & _
";distinguishedName,displayName,mDBUseDefaults,homemdb,"& _
"mDBOverQuotaLimit,mDBStorageQuota;subtree"

objCommand.Properties("Page Size") = 6000

Set objRecordSet = objCommand.Execute

While Not objRecordSet.EOF

'Make sure there is NO linewrap in the following line
if objRecordSet.Fields("mDBUseDefaults") = FALSE AND objRecordSet.Fields("homemdb") <> "" then

strOutput = objRecordSet.Fields("displayName") & ";" & _
objRecordSet.Fields("mDBOverQuotaLimit") & _
";" & objRecordSet.Fields("mDBStorageQuota")
objOutputFile.WriteLine strOutput
end if
objRecordSet.MoveNext
Wend

wscript.Echo "All Done"

15 Comments:

  • hi,

    grt Job,

    would you know of a way to progremmaticaly CHANGE the values per mailbox?

    I want to assign the limits as per security grp and am looking for a way to change these values for a single box

    tnx
    Roy

    By Anonymous Anonymous, at 12:06 PM  

  • Hi Roy, just saw this comment. Zip me an email if you're still interested in trying to do this. What you would probably have to do is enumerate each security group and loop through it assigning the values. Should work OK.

    By Blogger kristinaw, at 9:36 AM  

  • Thanks so much for this script! I needed something that would take care of this for me.

    By Blogger kevin.purcell, at 4:37 PM  

  • As a good alternative to scripting is a tool called message stats that is a part of scriptlogic's exchange management soluton.

    Message stats provides a wide range or reports and metrics on mailbox quotas, email usage, message sizes and public folders.

    By Anonymous Anonymous, at 10:12 AM  

  • Very nice. Thanks for sharing.

    By Anonymous Anonymous, at 9:57 AM  

  • In principle, a good happen, support the views of the author

    By Anonymous generic cialis, at 6:00 AM  

  • She may as well have been. He then put one of hisfingers into my dripping wet pussy.
    incest stories free
    ass fuck stories
    kirstens family dog sex stories
    aunt and niece lesbian sex stories
    read animal sex stories to me
    She may as well have been. He then put one of hisfingers into my dripping wet pussy.

    By Anonymous blue collar men gay sex stories, at 3:26 AM  

  • I wanted somedowntime. Its.
    sister brother incest stories
    free incest father preteen daughter stories
    bdsm horse stories
    forced animal sex stories free
    dirty true sex stories
    I wanted somedowntime. Its.

    By Anonymous hot kinky sex stories, at 9:13 AM  

  • [url=http://www.onlinecasinos.gd]casino[/url], also known as agreed casinos or Internet casinos, are online versions of commonplace ("buddy and mortar") casinos. Online casinos green sunrise gamblers to disport oneself and wager on casino games with the emancipate the Internet.
    Online casinos habitually construct on the person wretched odds and payback percentages that are comparable to land-based casinos. Some online casinos affirm on higher payback percentages as a countermeasure into terrible gismo games, and some state upon known payout apportionment audits on their websites. Assuming that the online casino is using an fittingly programmed unspecific lineage generator, note games like blackjack clothed an established train edge. The payout epitomize up assignment of these games are established to the core the rules of the game.
    Numerous online casinos explode gone from or obtain their software from companies like Microgaming, Realtime Gaming, Playtech, Worldwide Contrivance Technology and CryptoLogic Inc.

    By Anonymous Anonymous, at 8:13 PM  

  • top [url=http://www.001casino.com/]casino online[/url] check the latest [url=http://www.casinolasvegass.com/]casino online[/url] free no consign reward at the leading [url=http://www.baywatchcasino.com/]casino
    [/url].

    By Anonymous Anonymous, at 8:13 PM  

  • After you could have signed up with one of the no downpayment Casinos, you'll want to locate his or her program code pertaining to what on earth is termed a new "reload bonus". There are thousands of men and women across the world which have the funds essential to become a member of these kind of casinos as well as create enormous bets on a daily basis. And so regardless of whether you might be making the remains together with Visa, Mastercard, UKash, Click2Pay, ClickandBuy, Moneybookers/Skrill, Neteller, or even EcoCard, you are able to constantly think safe your orders is going to be encrypted, and that your dollars will likely be throughout very good arms using this type of Casino.

    Feel free to visit my site: no deposit casino accept us players

    By Anonymous Anonymous, at 12:33 PM  

  • I’m extremely imρressed ωith your writing
    talentѕ and also with the ѕtructuгe οn yоur blog.
    Is thаt this a рaid subjесt matter or did
    you modіfy іt your ѕelf? Anyωay keeр up the nice quality wrіting, іt’s uncommon to look a great blog liκе this оnе
    tοday..

    Also visit my wеb blog :: free microsoft points codes.how to get free microsoft points codes

    By Anonymous Anonymous, at 1:53 AM  

  • Hello, I еnjoy reading all of уour aгticle post.
    I lіke to ωritе a lіttle comment tо support you.


    Here is mу wеb ρage New Bingo Sites

    By Anonymous Anonymous, at 10:22 PM  

  • I absolutely love your blog and find nеarly all οf your pоѕt's to be exactly what I'm
    loоking for. can you offeг guеst writеrs to ωritе cοntent in
    your case? I wouldn't mind creating a post or elaborating on a lot of the subjects you write about here. Again, awesome weblog!

    Also visit my weblog; payday loans

    By Anonymous Anonymous, at 2:41 AM  

  • By Blogger Unknown, at 6:00 PM  

Post a Comment

<< Home