<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Modify Mailbox Storage limits</title>
	<link>http://www.spearnetworks.com/2007/04/30/29/</link>
	<description>the thoughts of a sane mind, inside an insane man, in a wacky world.</description>
	<pubDate>Thu, 20 Nov 2008 22:46:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>By: Todd</title>
		<link>http://www.spearnetworks.com/2007/04/30/29/#comment-34</link>
		<author>Todd</author>
		<pubDate>Mon, 30 Apr 2007 19:52:13 +0000</pubDate>
		<guid>http://www.spearnetworks.com/2007/04/30/29/#comment-34</guid>
					<description>Stacy,

Why write this one? Just create another store!

PS, your code blocks are FUBAR on FireFox! :)

T</description>
		<content:encoded><![CDATA[<p>Stacy,</p>
<p>Why write this one? Just create another store!</p>
<p>PS, your code blocks are FUBAR on FireFox! <img src='http://www.spearnetworks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>T</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stacy</title>
		<link>http://www.spearnetworks.com/2007/04/30/29/#comment-35</link>
		<author>Stacy</author>
		<pubDate>Wed, 02 May 2007 13:22:25 +0000</pubDate>
		<guid>http://www.spearnetworks.com/2007/04/30/29/#comment-35</guid>
					<description>Thanks for the heads up on the code blocks. FUBAR as well on IE 7. Not sure whats up with that.

One word on why I wrote that "Standard Edition!" Ok, two words. Standard edition can't have more than one mbx store. Get off your enterprise butt sometime! :)

How are things up in mid town? Down here, they are asking us to fill out this air quality report, on the first day where the Smog is actually at warning levels for sensitive groups!</description>
		<content:encoded><![CDATA[<p>Thanks for the heads up on the code blocks. FUBAR as well on IE 7. Not sure whats up with that.</p>
<p>One word on why I wrote that &#8220;Standard Edition!&#8221; Ok, two words. Standard edition can&#8217;t have more than one mbx store. Get off your enterprise butt sometime! <img src='http://www.spearnetworks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>How are things up in mid town? Down here, they are asking us to fill out this air quality report, on the first day where the Smog is actually at warning levels for sensitive groups!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Aaron Saberan</title>
		<link>http://www.spearnetworks.com/2007/04/30/29/#comment-36</link>
		<author>Aaron Saberan</author>
		<pubDate>Wed, 23 May 2007 19:40:49 +0000</pubDate>
		<guid>http://www.spearnetworks.com/2007/04/30/29/#comment-36</guid>
					<description>Having a little trouble with this.  You created it for me on Experts Exchange (Username is JosephGreenwald-which is my company name).  Anyway, it doesn't seem to work properly.  I try to run it (pasted it in a text document, changed the OU to my desired OU name, renamed to .vbs).  I get prompts telling me that "You Must specifiy the target OU......." then I click OK, then I get "And Disable the Syntax Like this:........", click ok, then I get a blank message with just an OK button, then I get "modmbxperms.vbs /ou:""GP Testing Only"" /warn:800 /nosend:900 /disable:1000" and click OK.  Then it goes away (after telling me I must be logged in as an Admin) and it doesn't seem to ever work.  As you can see, I changed the warning to 800, no send to 900 and disable to 1000 as I didn't know if it was bytes, kb, mb, etc.  This was just a test account so I didn't care if it got locked out.  Can you help?  Thanks!</description>
		<content:encoded><![CDATA[<p>Having a little trouble with this.  You created it for me on Experts Exchange (Username is JosephGreenwald-which is my company name).  Anyway, it doesn&#8217;t seem to work properly.  I try to run it (pasted it in a text document, changed the OU to my desired OU name, renamed to .vbs).  I get prompts telling me that &#8220;You Must specifiy the target OU&#8230;&#8230;.&#8221; then I click OK, then I get &#8220;And Disable the Syntax Like this:&#8230;&#8230;..&#8221;, click ok, then I get a blank message with just an OK button, then I get &#8220;modmbxperms.vbs /ou:&#8221;"GP Testing Only&#8221;" /warn:800 /nosend:900 /disable:1000&#8243; and click OK.  Then it goes away (after telling me I must be logged in as an Admin) and it doesn&#8217;t seem to ever work.  As you can see, I changed the warning to 800, no send to 900 and disable to 1000 as I didn&#8217;t know if it was bytes, kb, mb, etc.  This was just a test account so I didn&#8217;t care if it got locked out.  Can you help?  Thanks!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stacy</title>
		<link>http://www.spearnetworks.com/2007/04/30/29/#comment-37</link>
		<author>Stacy</author>
		<pubDate>Fri, 25 May 2007 00:45:47 +0000</pubDate>
		<guid>http://www.spearnetworks.com/2007/04/30/29/#comment-37</guid>
					<description>The sizes just like those listed in Exchange System Manager are all in kilobytes. So a 100mb limit would be listed as 100000. Of course this is approximately 100mb due to conversion factors.

I am thinking that you are modifying the help text in the script. You must provide command line arguments to the script like so:


modmbxperms.vbs /ou:“ou=Southwest Sales,ou=sales”
/warn:80000 /nosend:90000 /disable:100000

Thats all on one line. You can not just double-click the script to run it, must be at the command line, because you need the arguments.

Of course you could just create a new .cmd file, edit it, paste in your typical modification and save it. Then just double click that when needed.</description>
		<content:encoded><![CDATA[<p>The sizes just like those listed in Exchange System Manager are all in kilobytes. So a 100mb limit would be listed as 100000. Of course this is approximately 100mb due to conversion factors.</p>
<p>I am thinking that you are modifying the help text in the script. You must provide command line arguments to the script like so:</p>
<p>modmbxperms.vbs /ou:“ou=Southwest Sales,ou=sales”<br />
/warn:80000 /nosend:90000 /disable:100000</p>
<p>Thats all on one line. You can not just double-click the script to run it, must be at the command line, because you need the arguments.</p>
<p>Of course you could just create a new .cmd file, edit it, paste in your typical modification and save it. Then just double click that when needed.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Aaron Saberan</title>
		<link>http://www.spearnetworks.com/2007/04/30/29/#comment-38</link>
		<author>Aaron Saberan</author>
		<pubDate>Mon, 18 Jun 2007 20:17:26 +0000</pubDate>
		<guid>http://www.spearnetworks.com/2007/04/30/29/#comment-38</guid>
					<description>Stacy,

Sorry, but I still can't get it to work.

I think I've tried just about all I can think of.  

Let me outline my steps so maybe you can point out what I'm doing wrong.
First I'm pasting this text into Notepad:

' Written by: Stacy Spear (Darkstar 3D)
' Date: April 30, 2007
' This code modifies the mailbox size limits of an entire container or OU. Run the command without arguments to get a help display
' Version History
'1.0	- Original


'Argument Check
If Wscript.Arguments.Named("ou") = "GP Testing Only" or Wscript.Arguments.Named("warn") = "800" or Wscript.Arguments.Named("nosend") = "900" or Wscript.Arguments.Named("disable") = "1000" Then 'Check for the named arguments
	'Send help message if arguments is not correct
	Wscript.echo "You must specifiy the target OU and the sizes for Warning, Nosend," 
	Wscript.echo "and Disable using syntax like this:"
	Wscript.echo
	Wscript.echo "modmbxperms.vbs /ou:""GP Testing Only"" /warn:800 /nosend:900 /disable:1000"
	Wscript.echo "Account running this script MUST have enough AD rights to make these changes"
	Wscript.Quit
End If

'Connect to AD
Set RootDSE = GetObject("LDAP://RootDSE")
strDomain = RootDSE.Get("DefaultNamingContext")
ou = Wscript.Arguments.Named("ou") &#38; "," &#38; strDomain ' Build the LDAP connection string for the OU or container

'Copy arguments to variables for ease of use
warn = Wscript.Arguments.Named("warn") 
nosend = Wscript.Arguments.Named("nosend")
disable = Wscript.Arguments.Named("disable")

'Query AD for members of the OU
Set objGroup = GetObject("LDAP://" &#38; ou)

'Update AD for each user in the OU
For each objUser in objGroup
  If objUser.class="user" then
  objUser.mDBUseDefaults = False 'Toggle the switch for "Use Mailbox Store Defaults" to off
  objUser.Put "mDBStorageQuota", warn ' Warning Limit
  objUser.Put "mDBOverQuotaLimit", nosend 'Nosend Limit
  objUser.Put "mDBOverHardQuotaLimit", disable 'Disable Mailbox Limit
  objUser.SetInfo 'Write object to AD
  intCounter = intCounter +1 'Increment the counter
  End if
next
WScript.Echo intCounter &#38; " Limits Changed "
WScript.Quit

Then I am saving the file as Gptestingonly.vbs and running it from a command prompt (Start--&#62;Run "cmd") then I am running it from the root of the c drive by typing "Gptestingonly.vbs".  This gives me an error message such as "Expected Then in line....." or ";" or something similar.

What am I doing wrong?</description>
		<content:encoded><![CDATA[<p>Stacy,</p>
<p>Sorry, but I still can&#8217;t get it to work.</p>
<p>I think I&#8217;ve tried just about all I can think of.  </p>
<p>Let me outline my steps so maybe you can point out what I&#8217;m doing wrong.<br />
First I&#8217;m pasting this text into Notepad:</p>
<p>&#8216; Written by: Stacy Spear (Darkstar 3D)<br />
&#8216; Date: April 30, 2007<br />
&#8216; This code modifies the mailbox size limits of an entire container or OU. Run the command without arguments to get a help display<br />
&#8216; Version History<br />
&#8216;1.0	- Original</p>
<p>&#8216;Argument Check<br />
If Wscript.Arguments.Named(&#8221;ou&#8221;) = &#8220;GP Testing Only&#8221; or Wscript.Arguments.Named(&#8221;warn&#8221;) = &#8220;800&#8243; or Wscript.Arguments.Named(&#8221;nosend&#8221;) = &#8220;900&#8243; or Wscript.Arguments.Named(&#8221;disable&#8221;) = &#8220;1000&#8243; Then &#8216;Check for the named arguments<br />
	&#8216;Send help message if arguments is not correct<br />
	Wscript.echo &#8220;You must specifiy the target OU and the sizes for Warning, Nosend,&#8221;<br />
	Wscript.echo &#8220;and Disable using syntax like this:&#8221;<br />
	Wscript.echo<br />
	Wscript.echo &#8220;modmbxperms.vbs /ou:&#8221;"GP Testing Only&#8221;" /warn:800 /nosend:900 /disable:1000&#8243;<br />
	Wscript.echo &#8220;Account running this script MUST have enough AD rights to make these changes&#8221;<br />
	Wscript.Quit<br />
End If</p>
<p>&#8216;Connect to AD<br />
Set RootDSE = GetObject(&#8221;LDAP://RootDSE&#8221;)<br />
strDomain = RootDSE.Get(&#8221;DefaultNamingContext&#8221;)<br />
ou = Wscript.Arguments.Named(&#8221;ou&#8221;) &amp; &#8220;,&#8221; &amp; strDomain &#8216; Build the LDAP connection string for the OU or container</p>
<p>&#8216;Copy arguments to variables for ease of use<br />
warn = Wscript.Arguments.Named(&#8221;warn&#8221;)<br />
nosend = Wscript.Arguments.Named(&#8221;nosend&#8221;)<br />
disable = Wscript.Arguments.Named(&#8221;disable&#8221;)</p>
<p>&#8216;Query AD for members of the OU<br />
Set objGroup = GetObject(&#8221;LDAP://&#8221; &amp; ou)</p>
<p>&#8216;Update AD for each user in the OU<br />
For each objUser in objGroup<br />
  If objUser.class=&#8221;user&#8221; then<br />
  objUser.mDBUseDefaults = False &#8216;Toggle the switch for &#8220;Use Mailbox Store Defaults&#8221; to off<br />
  objUser.Put &#8220;mDBStorageQuota&#8221;, warn &#8216; Warning Limit<br />
  objUser.Put &#8220;mDBOverQuotaLimit&#8221;, nosend &#8216;Nosend Limit<br />
  objUser.Put &#8220;mDBOverHardQuotaLimit&#8221;, disable &#8216;Disable Mailbox Limit<br />
  objUser.SetInfo &#8216;Write object to AD<br />
  intCounter = intCounter +1 &#8216;Increment the counter<br />
  End if<br />
next<br />
WScript.Echo intCounter &amp; &#8221; Limits Changed &#8221;<br />
WScript.Quit</p>
<p>Then I am saving the file as Gptestingonly.vbs and running it from a command prompt (Start&#8211;&gt;Run &#8220;cmd&#8221;) then I am running it from the root of the c drive by typing &#8220;Gptestingonly.vbs&#8221;.  This gives me an error message such as &#8220;Expected Then in line&#8230;..&#8221; or &#8220;;&#8221; or something similar.</p>
<p>What am I doing wrong?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stacy</title>
		<link>http://www.spearnetworks.com/2007/04/30/29/#comment-39</link>
		<author>Stacy</author>
		<pubDate>Thu, 21 Jun 2007 17:56:07 +0000</pubDate>
		<guid>http://www.spearnetworks.com/2007/04/30/29/#comment-39</guid>
					<description>As stated previously, this code needs parameters to run. Without them, it fails and bombs out with giving you helpful hints on how to run it.</description>
		<content:encoded><![CDATA[<p>As stated previously, this code needs parameters to run. Without them, it fails and bombs out with giving you helpful hints on how to run it.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
