<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx</link><description>This blog post is a follow-up post to previous 3 CXP flashes that talked about Windows 2003 kernel memory issues and Exchange 2003: The first flash provided technical background about the demands Exchange makes on kernel resources. The second flash discussed</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416865</link><pubDate>Wed, 04 Jan 2006 18:30:51 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416865</guid><dc:creator>Brian</dc:creator><description>Ok, appreciate the scripts but I can't seem to get them to run.  I am (sadly) not a scripting person so maybe I'm doing something wrong... but I cut and pasted into notepad, saved as vbs, ran the command as documented (starting with cscript...), and on both scripts I receive the error message:&lt;br&gt;&lt;br&gt;groups.vbs(42, 1) Microsoft VBScript compilation error: Syntax error.  &lt;br&gt;&lt;br&gt;(of course it has the other script name for the other script).  &lt;br&gt;&lt;br&gt;Can anyone point me in the right direction?  The only thing I'm not sure of is whether I'm doing the domain naming context correctly, but I think I am.  For example, if our domain is tom.dick.harry.com, i'm using dc=tom, dc=dick, dc=harry, dc=com for that.  Thanks in advance for any tips!</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416867</link><pubDate>Wed, 04 Jan 2006 19:07:45 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416867</guid><dc:creator>Al</dc:creator><description>In Response to Brian.  When you copy from the web, it often puts in formatting that you don't see displayed.  In your case, I believe if you look, you'll see a bunch of spaces in your notepad version of the script. Take out the spaces and try again.  If you still get an error, open notepad, and use CTRL+G to go to the line referenced in the error.  If it got line wrapped or a space or other character got entered, it needs to be fixed for formatting.  Keep up this cycle and you'll get it working. &lt;br&gt;&lt;br&gt;Your grasp of domain context (dc=tom,dc=dick,dc=harry,dc=com) is correct. &lt;br&gt;&lt;br&gt;-ajm</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416868</link><pubDate>Wed, 04 Jan 2006 19:13:48 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416868</guid><dc:creator>Darren</dc:creator><description>You need to edit the .vbs files, since every line has a blank space when the files got posted, the continuation vb lines cause problems with multiline variable declaration.  You need to remove the blank line in between the declaration.&lt;br&gt;&lt;br&gt;In groups.vbs, remove blank lines from the following multiline variable values:&lt;br&gt;- strFilter&lt;br&gt;- Com.CommandText&lt;br&gt;- fileStream.WriteLine (near end of while loop/wend)&lt;br&gt;&lt;br&gt;In groups_statistics.vbs, remove the blank lines from the following multiline variable values:&lt;br&gt;- strFilter&lt;br&gt;- Com.CommandText&lt;br&gt;- Set oDirObject&lt;br&gt;&lt;br&gt;Once doing this, both mine ran fine.</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416871</link><pubDate>Wed, 04 Jan 2006 19:37:52 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416871</guid><dc:creator>Teo Heras</dc:creator><description>Mike,&lt;br&gt;&lt;br&gt;Thanks for the great article!  It's something I've never come across before.  Do chached mode clients require more or less paged pool memory from the server than non-chached mode clients?&lt;br&gt;&lt;br&gt;Teo</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416877</link><pubDate>Wed, 04 Jan 2006 20:28:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416877</guid><dc:creator>Brian</dc:creator><description>Great, works now!  Thanks Al &amp;amp; Darren for the assist!!</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416878</link><pubDate>Wed, 04 Jan 2006 20:38:42 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416878</guid><dc:creator>Exchange</dc:creator><description>Thank you Darren for helping on this!!&lt;br&gt;&lt;br&gt;Apologize for the confusion on this - we do realize there are issues with pasting scripts into the body but that's the only way we can put them up on the blog so they download to RSS readers. When KB article gets published - scripts will be available in the form that does not need tweaking.</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416883</link><pubDate>Wed, 04 Jan 2006 22:39:21 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416883</guid><dc:creator>joe</dc:creator><description>I think you will find you can substantially speed up these scripts by dumping the query&lt;br&gt;&lt;br&gt;strFilter = &amp;quot;(&amp;amp;(mail=*)(objectCategory=person)(objectClass=user)&amp;quot; &amp;amp;_&lt;br&gt;&lt;br&gt;                     &amp;quot;(msExchHomeServerName=*&amp;quot; &amp;amp; strArgs(3) &amp;amp; &amp;quot;))&amp;quot; 'Mail users search filter&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;and instead looking at values of the homeMDBBL attribute on the msExchPrivateMDB objects of the server in question. &lt;br&gt;&lt;br&gt;The medial portion of the filter above (the msExchHomeServerName=*servername) can be quite slow unless you have enabled medial indexing on that specific attribute. You should seriously notice a difference in the two mechanisms of retrieving the user DNs with mailboxes on that server if you have busy DCs or a large domain. &lt;br&gt;&lt;br&gt;The query you show would have to look at the very least at every object with a mail address as the mail attribute would most likely have the smallest number of objects of the indexed attributes in the query. Lots of contacts or mail enabled groups would add even more time to the query plus if you have lots of Exchange servers you have to weed out all but the one you are interested in. So you probably end up making AD touch as many objects as have mail addresses, hundreds, thousands, tens or hundreds of thousands, etc.&lt;br&gt;&lt;br&gt;On the flip side, looking at the homemdbbl values on the private MDB objects shows you exactly who has mailboxes on that server and will only have to touch and return maybe 20 objects. &lt;br&gt;&lt;br&gt;Another alternative is to create a normal (non-medial) index for msExchHomeServerName and use the full value of the name instead of doing a medial search. That still probably wouldn't be as fast as looking at the private mdb objects but I would have to test it to be sure. &lt;br&gt;&lt;br&gt;  joe&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416885</link><pubDate>Wed, 04 Jan 2006 22:40:38 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416885</guid><dc:creator>Mike Lee</dc:creator><description>@Teo Heras&lt;br&gt;&lt;br&gt;Yes, Exchange cached mode uses more paged pool than online mode. I'm still working on providing more detail and recommendations for a KB article, so take what I say here as preliminary only.&lt;br&gt;&lt;br&gt;An online user will typically cause 3 or 4 copies of the token to be generated, while a cached mode user requires 6 to 8 copies. This can go up if you have public folder and free/busy access happening on the mailbox server.&lt;br&gt;&lt;br&gt;Here's a quick and dirty way to estimate how many copies a particular Outlook 2003 user is generating (this will typically estimate a little high):&lt;br&gt;&lt;br&gt;Ctrl+right click the Outlook 2003 icon in the system tray. This exposes the Connection Status dialog. On that dialog, count the number of connections listed for a particular server.&lt;br&gt;&lt;br&gt;Now, run netstat -o and count the connections going to the Exchange server. &lt;br&gt;&lt;br&gt;Add these together and add 2, and that gives you a decent estimate of number of connections.&lt;br&gt;&lt;br&gt;The logons page in ESM does not give you an accurate count, for this purpose.</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#416892</link><pubDate>Thu, 05 Jan 2006 00:23:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:416892</guid><dc:creator>Kyryl Perederiy</dc:creator><description>Joe,&lt;br&gt;&lt;br&gt;Thanks for the advice. You are right, the performance of the script could be improved in several ways at the cost of flexibility. In large environments you're typicaly will be interested in looking at a bunch of servers (like EXCH-MBX-*). And yes, it will take several seconds or minutes to execute a query but you want to run it only once.&lt;br&gt;&lt;br&gt;Kyryl</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#418109</link><pubDate>Thu, 26 Jan 2006 02:13:41 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:418109</guid><dc:creator>Ed</dc:creator><description>Do these scripts include the group membership of all DLG's in the Forest, or only the DLG's of the domain in which the script is run against?</description></item><item><title>re: Scripts to count and generate statistics about the number of security groups to which an Exchange user belongs</title><link>http://blogs.technet.com/exchange/archive/2006/01/03/416840.aspx#418191</link><pubDate>Fri, 27 Jan 2006 04:38:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:418191</guid><dc:creator>Kyryl Perederiy</dc:creator><description>Ed,&lt;br&gt;&lt;br&gt;The second is true. These scripts will count only DLG's of the domain in which the script is running.</description></item></channel></rss>