<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://theessentialexchange.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>Essential Exchange</title><link>http://theessentialexchange.com/blogs/</link><description>&lt;i&gt;Your source for everything essential about &lt;br/&gt;Microsoft Exchange Server&lt;/i&gt;</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Script for From The Field</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/10/06/script-for-from-the-field.aspx</link><pubDate>Mon, 06 Oct 2008 19:57:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:371</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;The authors of the upcoming &amp;quot;Windows Server 2008 Terminal Services Resource Kit&amp;quot; asked me if I wanted to write a script for them for a section named &amp;quot;From The Field&amp;quot;. I said sure! I based the script on one I wrote a long time ago, which you can access &lt;a class="" href="http://theessentialexchange.com/blogs/michael/archive/2007/11/13/a-small-script-send-email-via-cdo.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;nbsp;So the readers have&amp;nbsp;the EXACT script&amp;nbsp;that was&amp;nbsp;published I&amp;#39;m putting this on my blog.&lt;/p&gt;
&lt;p&gt;The purpose for this script is to tie the script to a particular event that might occur from Terminal Services. This capability&amp;nbsp;is a new feature of the Windows Server 2008 Event Log Subsystem. If that event occurs, then this script is executed to send an email.&lt;/p&gt;
&lt;p&gt;Now, the Resource Kit goes into detail of the event id that happens and how you actually do that tying together. Go buy it!&amp;nbsp; :-)&lt;/p&gt;
&lt;p&gt;Of course, there are multiple ways to skin this cat, but here is one for you to use.&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;&lt;pre&gt;Option Explicit

&amp;#39;&amp;#39;&amp;#39;----- script configuration area
Const strSMTPServer = &amp;quot;arvon.alpineskihouse.com&amp;quot;
Const strFrom       = &amp;quot;alerts@alpineskihouse.com&amp;quot;
Const strTo         = &amp;quot;adam.barr@alpineskihouse.com &amp;quot;
&amp;#39;&amp;#39;&amp;#39;----- end configuration area

Dim objMail               &amp;#39; the CDO object
Dim objWSHNetwork         &amp;#39; windows-script-host network object
Dim strNetBIOSComputer    &amp;#39; the netbios name of our computer

&amp;#39;&amp;#39;&amp;#39; get the NetBIOS computer name
Set objWSHNetwork  = CreateObject (&amp;quot;WScript.Network&amp;quot;)
strNetBIOSComputer = objWSHNetwork.ComputerName
Set objWSHNetwork  = Nothing 

&amp;#39;&amp;#39;&amp;#39; do the real work to send the message 
Set objMail = CreateObject (&amp;quot;CDO.Message&amp;quot;)
objMail.Configuration.Fields.Item (&amp;quot;http://schemas.microsoft.com/cdo/configuration/sendusing&amp;quot;)      = 2
objMail.Configuration.Fields.Item (&amp;quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&amp;quot;)     = strSMTPServer
objMail.Configuration.Fields.Item (&amp;quot;http://schemas.microsoft.com/cdo/configuration/smtpserverport&amp;quot;) = 25
objMail.Configuration.Fields.Update

objMail.From     = strFrom
objMail.To       = strTo
objMail.Subject  = &amp;quot;Critical error!! &amp;quot; &amp;amp; strNetBIOSComputer &amp;amp; &amp;quot; failed to reboot &amp;quot; &amp;amp; Now
objMail.Textbody = &amp;quot;Critical error!! &amp;quot; &amp;amp; strNetBIOSComputer &amp;amp; &amp;quot; failed to reboot &amp;quot; &amp;amp; Now &amp;amp; vbCRLF
objMail.Send

Set objMail = Nothing
&lt;/pre&gt;&lt;/font&gt;
&lt;p&gt;Until next time... &lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know! &lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=371" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Script/default.aspx">Script</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Windows/default.aspx">Windows</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Books/default.aspx">Books</category></item><item><title>It's All About The IOPS, Silly!</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/09/19/it-s-all-about-the-iops-silly.aspx</link><pubDate>Fri, 19 Sep 2008 13:50:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:368</guid><dc:creator>michael</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;In yesterday&amp;#39;s EMO (Exchange Messaging Outlook eZine, subscribe at &lt;a href="http://www.slipstick.com/emo"&gt;http://www.slipstick.com/emo&lt;/a&gt;) I had an article named &lt;a class="" href="http://peach.ease.lsoft.com/scripts/wa.exe?A2=ind0809&amp;amp;L=EMO-NEWSLETTER&amp;amp;T=0&amp;amp;F=&amp;amp;S=&amp;amp;P=1470" target="_blank"&gt;It&amp;#39;s All About The IOPS, Silly!&lt;/a&gt; which discussed the impact of RAID-1 and RAID-5 arrays on total IOPS calculations.&lt;/p&gt;
&lt;p&gt;However, space didn&amp;#39;t allow me to talk about SANs (Storage Area Networks) in regards to IOPS.&lt;/p&gt;
&lt;p&gt;Where Exchange is concerned (and SQL Server as well, although that isn&amp;#39;t our focus here), you do not want to be sharing your &amp;quot;disk group&amp;quot; or &amp;quot;volume group&amp;quot; or &amp;quot;virtual array&amp;quot; (or whatever your SAN software calls it) with any other application&amp;nbsp;- unless you&amp;#39;ve performance tested it in the worst case.&lt;/p&gt;
&lt;p&gt;SANs allocate storage in terms of LUNs - Logical Unit Numbers. For a given server, a LUN is allocated to that server (note that in the case of clusters, quorum disk may be visible to multiple servers at one time) and only one server may have write access to that LUN at a time. A LUN may, or may not, be tied to a particular disk array or disk set contained within the physical hardware of the SAN.&lt;/p&gt;
&lt;p&gt;Many types of SAN software support a concept known as &amp;quot;LUN Stacking&amp;quot;. In this case, an array (be it RAID-1, RAID-5, RAID-10, whatever) has multiple logical stripes of the disk where multiple LUNs are allocated on the same array. Arguably, this is what SANs are all about - allowing you to control storage logically instead of drive-by-drive. And, for many (perhaps most) applications this makes sense.&lt;/p&gt;
&lt;p&gt;However, while the BEST CASE SCENARIO says that the IOPS available for a LUN is the maximum IOPS available for that disk set, the WORST CASE scenario says that the IOPS available for a LUN is equal to the number of accessors (servers) that are using that physical array.&lt;/p&gt;
&lt;p&gt;So, for example, if you have five servers hitting a RAID-1 array via different LUNS, the best case performance scenario says that you can have the maxiumum IOPS available to the hardware available to each server. The worst case is IOPS / 5.&lt;/p&gt;
&lt;p&gt;For example, if your RAID-1 group has a calculated IOPS of 250, one server could potentially benefit from having a total IOPS of 250 available to it. However, if all the servers are hitting the disk, the performance would be more like 50 IOPS. While for many small and medium businesses, an IOPS of 250 is probably sufficient to meet their Exchange needs - only the smallest of companies can get adequate performance on 50 IOPS total.&lt;/p&gt;
&lt;p&gt;Another reason you want to avoid sharing LUNs is due to the usage profiles of the various Exchange needs.&lt;/p&gt;
&lt;p&gt;Database access (which includes queues, mailbox stores, and public folder stores) is completely random. The creation of log files (transaction log files, message tracking logfiles, and protocol log files) is completely sequential. If you share LUNs between different usage profiles, then your performance will suffer (especially for those needs which are optimized for sequential access).&lt;/p&gt;
&lt;p&gt;Conclusion: Just Say No! Don&amp;#39;t let your SAN guys tell you what kind of storage performance requirements Exchange has. You need to be prepared to tell them!&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=368" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Administration/default.aspx">Administration</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Groups and their Membership</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/09/19/groups-and-their-membership.aspx</link><pubDate>Fri, 19 Sep 2008 13:09:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:367</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m working with a new client and this client is a &amp;quot;wholly owned subsidiary&amp;quot; of another company and is getting ready to be spun off as their own company.&lt;/p&gt;
&lt;p&gt;One of the things we are doing is configuring their network to be standalone and not part of the corporate Active Directory. That involves creating users, group, moving computers, installing a new Exchange organization, etc. etc.&lt;/p&gt;
&lt;p&gt;But sometimes it&amp;#39;s the simple things that bite you...&lt;/p&gt;
&lt;p&gt;We&amp;#39;d gotten an export of the OU for the subsidiary out of corporate in a CSV file - every object, every attribute. That was a mess in-and-of itself, but at least all the data was there.&lt;/p&gt;
&lt;p&gt;So we started importing the data. And it broke.&lt;/p&gt;
&lt;p&gt;Huh? We&amp;#39;d done this before and no problem. What was going on here?&lt;/p&gt;
&lt;p&gt;Like I said - the simple things...&lt;/p&gt;
&lt;p&gt;This set of users and groups were using embedded groups. Sometimes up to five levels deep. (That is, a group within a group within a group within a group within a group.)&lt;/p&gt;
&lt;p&gt;Well, you can&amp;#39;t assign a group membership to a group that doesn&amp;#39;t exist! Seems obvious, in retrospect.&lt;/p&gt;
&lt;p&gt;The solution? Go through and harvest all groups FIRST - just create the groups in Active Directory. Then, go back through and assign membership to the groups.&lt;/p&gt;
&lt;p&gt;Here is a somewhat sanitized version of the code we used. On the first pass, it creates groups. On the second pass, it will assign membership to the groups. This shows a number of PowerShell techniques in group management - including creating groups, checking for membership in a group, and adding members to a group.&lt;/p&gt;
&lt;p&gt;Also note: there are several places where this script could be optimized. But I was more interested in clarity (since, as a consultant, I won&amp;#39;t be there forever!).&lt;/p&gt;
&lt;p&gt;I hope you find this useful&amp;nbsp;for your scripts!&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;&lt;pre&gt;set-variable ADS_GROUP_TYPE_DOMAIN_LOCALGROUP 1          
set-variable ADS_GROUP_TYPE_GLOBAL_GROUP      2          
set-variable ADS_GROUP_TYPE_LOCAL_GROUP       4          
set-variable ADS_GROUP_TYPE_UNIVERSAL_GROUP   8          
set-variable ADS_GROUP_TYPE_SECURITY_ENABLED -2147483648 

$groupType = $ADS_GROUP_TYPE_GLOBAL_GROUP –bor $ADS_GROUP_TYPE_SECURITY_ENABLED

$csv = import-csv GroupsOnly.csv
#
# Each line contains the dn, the name, the description if one exists, and the member list
# with the dn of each group member. The member list has each member separated by a semi-colon.
#
foreach ($line in $csv)
{
	$dn = $line.dn
	$adsPath = &amp;quot;LDAP://&amp;quot; + $dn
	$objGroup = [ADSI]$adsPath
	if ($objGroup.Name)
	{
		# the above verifies that the group exists. Note that 
		# ADSI is &amp;quot;smart&amp;quot;. It doesn&amp;#39;t actually access AD and 
		# fill the property cache until you read an attribute
		# from the object.
		&amp;quot;Exists: &amp;quot; + $line.Name
		if ($line.member.Length -gt 0)
		{
			$i = 0
			$members = $line.member.Split(&amp;quot;;&amp;quot;)
			$lower   = $dn.ToLower()
			foreach ($member in $members)
			{
				$objMember = [ADSI](&amp;quot;LDAP://&amp;quot; + $member)
				if ($objMember.Name)
				{
					# check to see if member is already in group
					[bool]$already = $false
					$userGroups = $objMember.memberOf.Value
					if ($userGroups)
					{
						foreach ($usergroup in $userGroups)
						{
							if ($userGroup.ToLower() -eq $lower)
							{
								$already = $true
								break
							}
						}
					}
					$objMember = $null
					if ($already)
					{
						&amp;quot;`tAlready in group: $member&amp;quot;
					}
					else
					{
						$objGroup.Add((&amp;quot;LDAP://&amp;quot; + $member))
						if ($?)
						{
							&amp;quot;`tAdded to group: $member&amp;quot;
							$i++
						}
						else
						{
							# should be an error displayed on the PowerShell window
							&amp;quot;`tCouldn&amp;#39;t add to group: $member&amp;quot;
						}
					}
				}
				else
				{
					# member specified in CSV doesn&amp;#39;t exist in Active Directory
					&amp;quot;`tObject doesn&amp;#39;t exist: $member&amp;quot;
				}
			}
			&amp;quot;`tadded $i members&amp;quot;
		}
		else
		{
			# members element of the CSV was empty
			&amp;quot;`tno members specified for group&amp;quot;
		}
		$objGroup = $null
	}
	else 
	{
		&amp;quot;Creating &amp;quot; + $line.Name

		$parent = &amp;quot;LDAP://&amp;quot; + $dn.SubString(1 + $dn.IndexOf(&amp;quot;,&amp;quot;))
		$object = [ADSI]$parent
		$child  = $object.Create(&amp;quot;group&amp;quot;, &amp;quot;CN=&amp;quot; + $line.Name)

		$child.Put(&amp;quot;groupType&amp;quot;,      $groupType)
		$child.Put(&amp;quot;sAMAccountName&amp;quot;, $line.name)
		$child.Put(&amp;quot;name&amp;quot;,           $line.name)

		if ($line.description.length -gt 0)
		{
			$child.Put(&amp;quot;description&amp;quot;,    $line.description)
		}

		$child.SetInfo()
		$child = $null

	}

	sleep -milli 500
}

$csv = $null
&lt;/pre&gt;&lt;/font&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=367" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>I Have a Logo!</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/09/04/i-have-a-logo.aspx</link><pubDate>Thu, 04 Sep 2008 22:03:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:363</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In case anyone besides me is counting, I&amp;#39;ve been at this (consulting, writing, speaking, etc.) for 10 months now. I&amp;#39;m having a blast. I wish I&amp;#39;d done this years ago.&lt;/p&gt;
&lt;p&gt;Two months ago I took on a partner and we formed Smith Consulting d/b/a The Essential Exchange as a legal entity (as opposed to the sole proprietership I was previously).&lt;/p&gt;
&lt;p&gt;After several weeks of back-and-forth, we finally came up with a logo today, and I&amp;#39;m very pleased with it. It will replace the generic icons you see on this blog fairly soon (image manipulation is not my strong suit). Here it is:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://theessentialexchange.com/blogs/michael/SmithConsulting.gif"&gt;&lt;img src="http://theessentialexchange.com/blogs/michael/SmithConsulting.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=363" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Personal/default.aspx">Personal</category></item><item><title>Exchange 2007 Backup and Restore - The Minimum</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/09/04/exchange-2007-backup-and-restore-the-minimum.aspx</link><pubDate>Thu, 04 Sep 2008 21:22:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:362</guid><dc:creator>michael</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;In larger organizations, the overhead associated with backing up every server in an organization (where every server is already redundant in some way) can become onerous and expensive. In those types of organizations, with dedicated virtual servers for a specific feature or multiple pieces of physical hardware set up clustered or otherwise redundant (round robin, network load balancing, etc.); you are primarily interested in only backing up what makes a particular server unique.&lt;/p&gt;
&lt;p&gt;You are well aware that in the case of a catastrophic failure, you can &amp;quot;spin up&amp;quot; a replacement in a couple of hours, be it virtual or physical hardware. It would take longer than that to execute a full restore following all the proper steps.&lt;/p&gt;
&lt;p&gt;Therefore, many applications, Exchange included, provide you a mechanism for backing up and restoring only those &amp;quot;things you need&amp;quot;.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s take the example of a Client Access Server (CAS) crashing catastrophically. For example, a piece of hair falls on the motherboard and it fizzles, taking out the motherboard AND the directly attached storage (DAS). [[OK: not a particularly likely example, but still illustrative.]]&lt;/p&gt;
&lt;p&gt;What do you need to have saved in order to CYA (Cover Your A$$)??&lt;/p&gt;
&lt;p&gt;Your first option is, of course, the old standard: full system backup, which you can restore after doing a bare metal install of Windows Server to compatible hardware.&lt;/p&gt;
&lt;p&gt;The second option, which is a bit more detailed but MUCH quicker, if you&amp;#39;ve prepared for it, goes as follows:&lt;/p&gt;
&lt;p&gt;1] Image a new machine, and name it the same as the old machine&lt;/p&gt;
&lt;p&gt;2] Install Exchange, using the /mode:RecoverServer switch, with all other options set to the SAME as you used to install the original server (this is when using DEFAULTS can really save your bacon -- or having excellent server installation documentation)&lt;/p&gt;
&lt;p&gt;3] Restore the HKLM\SOFTWARE\Microsoft\Exchange registry key (which you smartly exported and backed up)&lt;/p&gt;
&lt;p&gt;4] Restore the ClientAccess Exchange directory (which you also had smartly exported and backed up), which is located by default at C:\Program Files\Microsoft\Exchange\ClientAccess&lt;/p&gt;
&lt;p&gt;5] Restore the IIS metabase settings by executing restorevdir.ps1 (since you had executed savevdir.ps1 to back those settings up!)&lt;/p&gt;
&lt;p&gt;And wow. You are done. &lt;/p&gt;
&lt;p&gt;If you have practiced this process, and your imaging process is fast; you can probably be done in less than 30 minutes. Much less than the two hours or so that a full recovery is probably is going to take you.&lt;/p&gt;
&lt;p&gt;Granted, the above is simply an overview. You need to work out the specific details for your environment, but it really isn&amp;#39;t that hard. Here are some resources to help you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;a class="" href="http://technet.microsoft.com/en-us/library/aa998364(EXCHG.80).aspx" target="_blank"&gt;Client Access Server Data&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a class="" href="http://technet.microsoft.com/en-us/library/bb124359%28EXCHG.80%29.aspx" target="_blank"&gt;How to Back Up and Restore a Client Access Server&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a class="" href="http://technet.microsoft.com/en-us/library/bb124780(EXCHG.80).aspx" target="_blank"&gt;What Needs to be Protected in an Exchange Environment&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a class="" href="http://technet.microsoft.com/en-us/library/aa997709(EXCHG.80).aspx" target="_blank"&gt;How to Back Up the System State and the Exchange Program Files&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Actually, writing a script to do this might be a good project, if I ever get a few free minutes. :-)&lt;/p&gt;
&lt;p&gt;You can also extend this concept for generating clones and redundant servers within an Exchange organization. If you examine the various text files, you will note that modifying them for other server names is not that difficult.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=362" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Administration/default.aspx">Administration</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Exchange Disk Space, version 2.1</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/08/07/exchange-disk-space-version-2-1.aspx</link><pubDate>Thu, 07 Aug 2008 20:45:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:352</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;It was pointed out to me, by a party that shall remain nameless, that I depended in today&amp;#39;s earlier post &lt;a class="" href="http://theessentialexchange.com/blogs/michael/archive/2008/08/07/finding-disk-space-used-by-exchange-version-2.aspx" target="_blank"&gt;Finding Disk Space Used By Exchange Version 2&lt;/a&gt;, that I ASSumed that msExchCurrentServerRoles would never be higher than 64 and that that was a bad assumption on my part, for reasons that shall also remain nameless.&lt;/p&gt;
&lt;p&gt;So, here is a &amp;quot;fixed&amp;quot; version of just the ShowServerInfo() subroutine. Just rip the old one out, and add the new one in:&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;&lt;pre&gt;Const Exch_Role_Edge         = 64   &amp;#39; 0x40
Const Exch_Role_Hub          = 32   &amp;#39; 0x20
Const Exch_Role_UM           = 16   &amp;#39; 0x10
Const Exch_Role_ClientAccess = 4    &amp;#39; 0x04
Const Exch_Role_Mailbox      = 2    &amp;#39; 0x02

Sub ShowServerInfo (ByVal spaces, ByVal strServer)
	Dim objServer, obj
	Dim str, i, msExchCurrentRoles

	On Error Resume Next
	Err.Clear

	Set objServer = GetObject (&amp;quot;LDAP://&amp;quot; &amp;amp; strServer)
	If Err = 0 Then
		msExchCurrentRoles = objServer.Get (&amp;quot;msExchCurrentServerRoles&amp;quot;)
		If Err = 0 Then
			i = msExchCurrentRoles
			str = &amp;quot;&amp;quot;
			&amp;#39;&amp;#39; got a exchange 2007 or higher box
			If (msExchCurrentRoles and Exch_Role_Mailbox) = Exch_Role_Mailbox Then
				str = str &amp;amp; &amp;quot;Mailbox &amp;quot;
				i = i - Exch_Role_Mailbox
			End If

			If (msExchCurrentRoles and Exch_Role_ClientAccess) = Exch_Role_ClientAccess Then
				str = str &amp;amp; &amp;quot;ClientAccess &amp;quot;
				i = i - Exch_Role_ClientAccess
			End If

			If (msExchCurrentRoles and Exch_Role_UM) = Exch_Role_UM Then
				str = str &amp;amp; &amp;quot;UnifiedMessaging &amp;quot;
				i = i - Exch_Role_UM
			End If

			If (msExchCurrentRoles and Exch_Role_Hub) = Exch_Role_Hub Then
				str = str &amp;amp; &amp;quot;HubTransport &amp;quot;
				i = i - Exch_Role_Hub
			End If

			If (msExchCurrentRoles and Exch_Role_Edge) = Exch_Role_Edge Then
				str = str &amp;amp; &amp;quot;EdgeTransport &amp;quot;
				i = i - Exch_Role_Edge
			End If

			If i &amp;lt;&amp;gt; 0 Then
				str = str &amp;amp; vbCRLF &amp;amp; Space (spaces) &amp;amp; _
					&amp;quot;Unknown bits set in msExchCurrentRoles = 0x&amp;quot; &amp;amp; Hex(i)
			End If

			e Space (spaces) &amp;amp; &amp;quot;Exchange roles installed: &amp;quot; &amp;amp; str
		Else
			i = objServer.Get (&amp;quot;serverRole&amp;quot;)
			If i = 1 Then
				e Space (spaces) &amp;amp; &amp;quot;Exchange role: Front-end server&amp;quot;
			Else
				e Space (spaces) &amp;amp; &amp;quot;Exchange role: Back-end server&amp;quot;
			End If
		End If
		Err.Clear

		obj = objServer.Get (&amp;quot;serialNumber&amp;quot;)
		If Err = 0 Then
			If IsNull (obj) Then
				e Space (spaces) &amp;amp; &amp;quot;No version found&amp;quot;
			ElseIf IsEmpty (obj) Then
				e Space (spaces) &amp;amp; &amp;quot;Version string is empty&amp;quot;
			ElseIf IsArray (obj) Then
				For Each str in obj
					e Space (spaces) &amp;amp; str
				Next
			Else
				e Space (spaces) &amp;amp; obj
			End If
		End If
		Err.Clear

	End If
	e &amp;quot; &amp;quot;
	Set objServer = Nothing

	On Error Goto 0
End Sub
&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;Until next time...&lt;/pre&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=352" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Administration/default.aspx">Administration</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Script/default.aspx">Script</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Finding Disk Space Used by Exchange, version 2</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/08/07/finding-disk-space-used-by-exchange-version-2.aspx</link><pubDate>Thu, 07 Aug 2008 17:36:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:349</guid><dc:creator>michael</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;In July of 2006, I had a blog entry named &lt;a class="" href="http://theessentialexchange.com/blogs/michael/archive/2007/11/13/finding-disk-space-used-by-exchange.aspx" target="_blank"&gt;Finding Disk Space Used By Exchange&lt;/a&gt;, and it was quite well received and it worked well for most people.&lt;/p&gt;
&lt;p&gt;However, it had a few issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;It doesn&amp;#39;t work with Exchange Server 2007 because the streaming file was removed from Exchange&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If a Recovery Storage Group was present, but the files were removed, it would fail&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If an Exchange Server was not reachable via UNC path, it would fail&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;There was also one out-and-out bug: Per-server totals were not zeroed after each server was evaluated.&lt;/p&gt;
&lt;p&gt;And from a feature perspective, lots of folks wanted some information about the storage groups (circular logging, log prefix, etc.) and the servers (version and server roles).&lt;/p&gt;
&lt;p&gt;There is a &lt;a class="" href="http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem065.mspx" target="_blank"&gt;Microsoft script&lt;/a&gt; that also contains much of this information, but it is based on CDOEXM, which means that it pretty much must run on an Exchange 2003 server; and it also has the same three issues mentioned above (plus a couple of others - for example, if the EDB and STM files were separated on different volumes or path, it would also fail). James Chong, another Microsoft Exchange MVP, pointed out that script to me. It does have a feature of reporting the current sizes of the logs being used by a storage group.&lt;/p&gt;
&lt;p&gt;So, in this version 2, I&amp;#39;ve fixed the three issues above, fixed the out-and-out bug, and now I provide a fair bit of information about each storage group. I think I also now check for all possible errors that could occur. As before, this script does depend on my &lt;a class="" href="http://theessentialexchange.com/blogs/michael/archive/2007/11/13/utility-libraries-for-exchange-scripting.aspx" target="_blank"&gt;Utility Libraries for Exchange Scripting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have tested this script in an environment containing Exchange 2000, Exchange 2003, and Exchange 2007. It should work for you with all of those too!&lt;/p&gt;
&lt;p&gt;Some sample output from my small test environment:&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;&lt;pre&gt;Exchange Organization Name: First Organization
Default SMTP address for organization: essential.local

All Exchange Servers in forest DC=essential,DC=local
	Server Name: WIN2003-EXCH
	Server Name: WIN2008-EXCH
 
Server name: WIN2003-EXCH
  Exchange role: Back-end server
  Version Version 6.5 (Build 7638.2: Service Pack 2)
 
  Storage group: First Storage Group
    Circular Logging is False
    Zero out deleted databse pages is False
    Log file prefix is E00
    Transaction log location is C:\Program Files\Exchsrvr\mdbdata
    System path location is C:\Program Files\Exchsrvr\mdbdata
 
    Store: Public Folder Store (WIN2003-EXCH)
      EDB file: C:\Program Files\Exchsrvr\mdbdata\pub1.edb
      Size: 18 megabytes
      SLV file: C:\Program Files\Exchsrvr\mdbdata\pub1.stm
      Size: 4 megabytes
      Store Size Total: 22 megabytes
    Store: Mailbox Store (WIN2003-EXCH)
      EDB file: C:\Program Files\Exchsrvr\mdbdata\priv1.edb
      Size: 6 megabytes
      SLV file: C:\Program Files\Exchsrvr\mdbdata\priv1.stm
      Size: 8 megabytes
      Store Size Total: 14 megabytes
    Storage Group total: 36 megabytes
  Server total: 36 megabytes
 
Server name: WIN2008-EXCH
  Exchange roles installed: HubTransport ClientAccess Mailbox
  Version Version 8.1 (Build 30240.6)
 
  Storage group: First Storage Group
    Circular Logging is False
    Zero out deleted databse pages is False
    Log file prefix is E00
    Transaction log location is C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group
    System path location is C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group
 
    Store: Mailbox Database
      EDB file: C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Mailbox Database.edb
      ** Could not open file: \\WIN2008-EXCH\C$\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Mailbox Database.edb
      Could not find streaming filename in active directory
      Store Size Total: 0 megabytes
    Storage Group total: 0 megabytes
  Storage group: Recovery Storage Group
    Circular Logging is False
    Zero out deleted databse pages is False
    Log file prefix is R00
    Transaction log location is C:\rsg
    System path location is C:\rsg
 
    Store: Mailbox Database
      EDB file: C:\rsg\Mailbox Database.edb
      ** Could not open file: \\WIN2008-EXCH\C$\rsg\Mailbox Database.edb
      Could not find streaming filename in active directory
      Store Size Total: 0 megabytes
    Storage Group total: 0 megabytes
  Storage group: Second Storage Group
    Circular Logging is False
    Zero out deleted databse pages is False
    Log file prefix is E01
    Transaction log location is C:\Program Files\Microsoft\Exchange Server\Mailbox\Second Storage Group
    System path location is C:\Program Files\Microsoft\Exchange Server\Mailbox\Second Storage Group
 
    Store: Public Folder Database
      EDB file: C:\Program Files\Microsoft\Exchange Server\Mailbox\Second Storage Group\Public Folder Database.edb
      ** Could not open file: \\WIN2008-EXCH\C$\Program Files\Microsoft\Exchange Server\Mailbox\Second Storage Group\Public Folder Database.edb
      Could not find streaming filename in active directory
      Store Size Total: 0 megabytes
    Storage Group total: 0 megabytes
  Server total: 0 megabytes
 
Organization total: 36 megabytes

&lt;/pre&gt;&lt;/font&gt;
&lt;p&gt;And here is the code for your enjoyment:&lt;/p&gt;&lt;font color="green"&gt;&lt;/font&gt;&lt;font color="green"&gt;&lt;pre&gt;&amp;lt;JOB&amp;gt;
&amp;lt;SCRIPT language=&amp;quot;VBScript&amp;quot;&amp;gt;
Option Explicit
&amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT language=&amp;quot;VBScript&amp;quot; src=&amp;quot;lib/constants.vbs&amp;quot; mce_src=&amp;quot;lib/constants.vbs&amp;quot;&amp;gt;
&amp;lt;script language=&amp;quot;VBScript&amp;quot; src=&amp;quot;lib/ado.vbs&amp;quot; mce_src=&amp;quot;lib/ado.vbs&amp;quot;           &amp;gt;
&amp;lt;script language=&amp;quot;VBScript&amp;quot; src=&amp;quot;lib/report.vbs&amp;quot; mce_src=&amp;quot;lib/report.vbs&amp;quot;        &amp;gt;
&amp;lt;script language=&amp;quot;VBScript&amp;quot; src=&amp;quot;lib/systeminfo.vbs&amp;quot; mce_src=&amp;quot;lib/systeminfo.vbs&amp;quot;    &amp;gt;
&amp;lt;script language=&amp;quot;VBScript&amp;quot; src=&amp;quot;lib/queries.vbs&amp;quot; mce_src=&amp;quot;lib/queries.vbs&amp;quot;       &amp;gt;
&amp;lt;script language=&amp;quot;VBScript&amp;quot;&amp;gt;
&amp;#39;
&amp;#39; exch-store-space.wsf
&amp;#39;
&amp;#39; This program reports on the space utilization of the EDB and STM
&amp;#39; files for all stores for all storage groups for all servers in the
&amp;#39; Exchange organization.
&amp;#39;
&amp;#39; Updated on August 8, 2008 to deal with missing files
&amp;#39; Also now works with Exchange 2007 (no msExchSLVFile attribute on 2007 servers)
&amp;#39; Also dumps some data about each individual storage group
&amp;#39; Also won&amp;#39;t abort on missing Recovery Storage Group
&amp;#39; Also total per-server correctly
&amp;#39;
Dim arr, arrSG, arrStore
Dim s, s1, strServer
Dim i, j, k, orgTotal
Dim objFSO

Call GetSystemInfo
Call GetAllServers

Set objFSO = CreateObject (&amp;quot;Scripting.FileSystemObject&amp;quot;)

arr = Split (strServerListDN, &amp;quot;;&amp;quot;)

For i = LBound (arr) To UBound (arr)
	Dim serverTotal

	serverTotal = 0
	s = arr (i)
	strServer = Mid (Left (s, Instr (s, &amp;quot;,&amp;quot;) - 1), 4)
	e &amp;quot;Server name: &amp;quot; &amp;amp; strServer

	Call ShowServerInfo (2, s)

	Call GetStorageGroupsForServer (arr (i))

	arrSG = Split (strServerSGDN, &amp;quot;;&amp;quot;)

	For j = LBound (arrSG) To UBound (arrSG)
		Dim sgTotal

		sgTotal = 0

		s = arrSG (j)
		s1 = Mid (Left (s, Instr (s, &amp;quot;,&amp;quot;) - 1), 4)
		e Space (2) &amp;amp; &amp;quot;Storage group: &amp;quot; &amp;amp; s1

		Call ShowStorageGroupInfo (4, s)

		Call GetStoresForStorageGroupLDAP (s)

		arrStore = Split (strStoreDN, &amp;quot;;&amp;quot;)

		For k = LBound (arrStore) To UBound (arrStore)
			Dim obj, objFile, strFile, storeTotal

			storeTotal = 0

			s = arrStore (k)
			s1 = Mid (Left (s, Instr (s, &amp;quot;,&amp;quot;) - 1), 4)
			e Space (4) &amp;amp; &amp;quot;Store: &amp;quot; &amp;amp; s1

			On Error Resume Next
			Err.Clear

			Set obj = GetObject (&amp;quot;LDAP://&amp;quot; &amp;amp; s)

			If Err Then
				e Space (6) &amp;amp; &amp;quot;** Could not open store in active directory&amp;quot;
			Else
				s = obj.Get (&amp;quot;msExchEDBFile&amp;quot;)
				If Err Then
					e Space (6) &amp;amp; &amp;quot;** Could not find EDB filename in active directory&amp;quot;
				Else
				
					e Space (6) &amp;amp; &amp;quot;EDB file: &amp;quot; &amp;amp; s
					&amp;#39; must convert the file to a UNC path
					strFile = &amp;quot;\\&amp;quot; &amp;amp; strServer &amp;amp; &amp;quot;\&amp;quot; &amp;amp; _
						Left (s, 1) &amp;amp; &amp;quot;$&amp;quot; &amp;amp; Mid (s, 3)
					Set objFile = objFSO.GetFile (strFile)
					If Err Then
						e Space (6) &amp;amp; &amp;quot;** Could not open file: &amp;quot; &amp;amp; strFile
					Else
						e Space (6) &amp;amp; &amp;quot;Size: &amp;quot; &amp;amp; _
							FormatNumber (objFile.Size / (1024 * 1024), 0) &amp;amp; _
							&amp;quot; megabytes&amp;quot;
						storeTotal = storeTotal + (objFile.Size / (1024 * 1024))
					End If
				End If
				Err.Clear

				s = obj.Get (&amp;quot;msExchSLVFile&amp;quot;)
				If Err Then
					e Space (6) &amp;amp; &amp;quot;Could not find streaming filename in active directory&amp;quot;
				Else
					e Space (6) &amp;amp; &amp;quot;SLV file: &amp;quot; &amp;amp; s
					strFile = &amp;quot;\\&amp;quot; &amp;amp; strServer &amp;amp; &amp;quot;\&amp;quot; &amp;amp; _
						Left (s, 1) &amp;amp; &amp;quot;$&amp;quot; &amp;amp; Mid (s, 3)
					Set objFile = objFSO.GetFile (strFile)
					If Err Then
						e Space (6) &amp;amp; &amp;quot;** Could not open file: &amp;quot; &amp;amp; strFile
					Else
						e Space (6) &amp;amp; &amp;quot;Size: &amp;quot; &amp;amp; _
							FormatNumber (objFile.Size / (1024 * 1024), 0) &amp;amp; _
							&amp;quot; megabytes&amp;quot;
						storeTotal = storeTotal + (objFile.Size / (1024 * 1024))
					End If
				End If
				Err.Clear

				e Space (6) &amp;amp; &amp;quot;Store Size Total: &amp;quot; &amp;amp; _
					FormatNumber (storeTotal, 0) &amp;amp; _
					&amp;quot; megabytes&amp;quot;
				sgTotal = sgTotal + storeTotal
			End If

			On Error Goto 0
		Next

		e Space (4) &amp;amp; &amp;quot;Storage Group total: &amp;quot; &amp;amp; FormatNumber (sgTotal, 0) &amp;amp; _
			&amp;quot; megabytes&amp;quot;
		serverTotal = serverTotal + sgTotal
	Next

	e Space (2) &amp;amp; &amp;quot;Server total: &amp;quot; &amp;amp; FormatNumber (serverTotal, 0) &amp;amp; &amp;quot; megabytes&amp;quot;
	e &amp;quot; &amp;quot;
	orgTotal = orgTotal + serverTotal
Next
e &amp;quot;Organization total: &amp;quot; &amp;amp; FormatNumber (orgTotal, 0) &amp;amp; &amp;quot; megabytes&amp;quot;

Call ClearSystemInfo

Sub ShowServerInfo (ByVal spaces, ByVal strServer)
	Dim objServer, obj
	Dim str, i

	On Error Resume Next
	Err.Clear

	Set objServer = GetObject (&amp;quot;LDAP://&amp;quot; &amp;amp; strServer)
	If Err = 0 Then
		i = objServer.Get (&amp;quot;msExchCurrentServerRoles&amp;quot;)
		If Err = 0 Then
			str = &amp;quot;&amp;quot;
			&amp;#39;&amp;#39; got a exchange 2007 or higher box
			If i &amp;gt;= 64 Then
				str = str &amp;amp; &amp;quot;EdgeTransport &amp;quot;
				i = i - 64
			End If
			If i &amp;gt;= 32 Then
				str = str &amp;amp; &amp;quot;HubTransport &amp;quot;
				i = i - 32
			End If
			If i &amp;gt;= 16 Then
				str = str &amp;amp; &amp;quot;UnifiedMessaging &amp;quot;
				i = i - 16
			End If
			If i &amp;gt;= 4 Then
				str = str &amp;amp; &amp;quot;ClientAccess &amp;quot;
				i = i - 4
			End If
			If i &amp;gt;= 2 Then
				str = str &amp;amp; &amp;quot;Mailbox&amp;quot;
				i = i - 2
			End If
			e Space (spaces) &amp;amp; &amp;quot;Exchange roles installed: &amp;quot; &amp;amp; str
		Else
			i = objServer.Get (&amp;quot;serverRole&amp;quot;)
			If i = 1 Then
				e Space (spaces) &amp;amp; &amp;quot;Exchange role: Front-end server&amp;quot;
			Else
				e Space (spaces) &amp;amp; &amp;quot;Exchange role: Back-end server&amp;quot;
			End If
		End If
		Err.Clear

		obj = objServer.Get (&amp;quot;serialNumber&amp;quot;)
		If Err = 0 Then
			If IsNull (obj) Then
				e Space (spaces) &amp;amp; &amp;quot;No version found&amp;quot;
			ElseIf IsEmpty (obj) Then
				e Space (spaces) &amp;amp; &amp;quot;Version string is empty&amp;quot;
			ElseIf IsArray (obj) Then
				For Each str in obj
					e Space (spaces) &amp;amp; &amp;quot;Version &amp;quot; &amp;amp; str
				Next
			Else
				e Space (spaces) &amp;amp; &amp;quot;Version &amp;quot; &amp;amp; obj
			End If
		End If
		Err.Clear

	End If
	e &amp;quot; &amp;quot;
	Set objServer = Nothing

	On Error Goto 0
End Sub

Sub ShowStorageGroupInfo (ByVal spaces, ByVal strSG)
	Dim objSG
	Dim str, i
	Dim prefix

	prefix = &amp;quot;msExchESEParam&amp;quot;   &amp;#39;&amp;#39; all storage group attributes start with that prefix

	On Error Resume Next
	Err.Clear

	Set objSG = GetObject (&amp;quot;LDAP://&amp;quot; &amp;amp; strSG)
	If Err = 0 Then
		i = objSG.Get (prefix &amp;amp; &amp;quot;CircularLog&amp;quot;)
		If Err = 0 Then
			e Space (spaces) &amp;amp; &amp;quot;Circular Logging is &amp;quot; &amp;amp; CBool(i)
		End If
		Err.Clear

		i = objSG.Get (prefix &amp;amp; &amp;quot;ZeroDatabaseDuringBackup&amp;quot;)
		If Err = 0 Then
			e Space (spaces) &amp;amp; &amp;quot;Zero out deleted databse pages is &amp;quot; &amp;amp; CBool (i)
		End If
		Err.Clear

		str = objSG.Get (prefix &amp;amp; &amp;quot;BaseName&amp;quot;)
		If Err = 0 Then
			e Space (spaces) &amp;amp; &amp;quot;Log file prefix is &amp;quot; &amp;amp; str
		End If
		Err.Clear

		str = objSG.Get (prefix &amp;amp; &amp;quot;LogFilePath&amp;quot;)
		If Err = 0 Then
			e Space (spaces) &amp;amp; &amp;quot;Transaction log location is &amp;quot; &amp;amp; str
		End If
		Err.Clear

		str = objSG.Get (prefix &amp;amp; &amp;quot;SystemPath&amp;quot;)
		If Err = 0 Then
			e Space (spaces) &amp;amp; &amp;quot;System path location is &amp;quot; &amp;amp; str
		End If
		Err.Clear

		e &amp;quot; &amp;quot;
	Else
		e Space (spaces) &amp;amp; &amp;quot;** Couldn&amp;#39;t open &amp;quot; &amp;amp; strSG
	End If
	Set objSG = Nothing

	On Error Goto 0
End Sub
&amp;lt;/SCRIPT&amp;gt;
&amp;lt;/JOB&amp;gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=349" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Administration/default.aspx">Administration</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Script/default.aspx">Script</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Free Windows Vista Support (SP1 only)</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/30/free-windows-vista-support-sp1-only.aspx</link><pubDate>Wed, 30 Jul 2008 21:54:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:346</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As you probably know, Microsoft is working on running up its marketing machine to talk about how good Vista really is. (And yes, I was an early convert - I am one of those folks that really like Vista - it took some major thought-pattern changes, but it is really much easier to use.)&lt;/p&gt;
&lt;p&gt;As part of this, Microsoft has decided to offer free - yes free - installation and compatibility support for all users of Windows Vista SP1 through March 18, 2009. (Why that date? I have no idea.)&lt;/p&gt;
&lt;p&gt;Worldwide telephone support is available, and in the USA and Canada you can also get email and online chat-based support.&lt;/p&gt;
&lt;p&gt;For more information, or to take advantage of this offer, visit this website: &lt;a href="http://support.microsoft.com/common/international.aspx?rdpath=1&amp;amp;prid=11274&amp;amp;gprid=500921"&gt;http://support.microsoft.com/common/international.aspx?rdpath=1&amp;amp;prid=11274&amp;amp;gprid=500921&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(Yes, I know this sounds like a marketing post - and it really isn&amp;#39;t - I&amp;#39;m just encouraging you to use Vista, if you aren&amp;#39;t already!)&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=346" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Vista/default.aspx">Vista</category></item><item><title>Exchange 2003 SMTP Service - Without Exchange</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/28/exchange-2003-smtp-service-without-exchange.aspx</link><pubDate>Mon, 28 Jul 2008 21:11:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:344</guid><dc:creator>michael</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Learn something new every day...&lt;/p&gt;
&lt;p&gt;I was working with a new client today, on an SBS 2003 computer, and they use external e-mail.&lt;/p&gt;
&lt;p&gt;However, the original technican that had done the installation of their server had gone through the process of installing Exchange Server, and then disabled all of the services that start with &amp;quot;Microsoft Exchange...&amp;quot; in the Services applet - but they hadn&amp;#39;t disabled the SMTP service. As you may know, when you install Exchange Server 2003, it overwrites the Windows SMTP service with its own version of the service that &amp;quot;speaks Exchange&amp;quot;.&lt;/p&gt;
&lt;p&gt;Whenever I go into a client, I always like to be able to use a local SMTP server to send daily status report to me, for monitoring, and just general e-mailing. Usually, in an SBS environment, I&amp;#39;ll use the Exchange SMTP service and if Exchange isn&amp;#39;t installed, I&amp;#39;ll simply install the Windows SMTP service. This allows me to get around all of the usual problems associated with secure relays, etc. etc.&lt;/p&gt;
&lt;p&gt;So, in this case, I was sure that the SMTP service wouldn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;I was wrong. The SMTP service works just fine for relaying. You can&amp;#39;t manage the SMTP service from the normal IIS Manager, you still have to go to the Exchange System Manager to make changes. But it works just fine. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Like I said, learn something new every day...&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=344" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/SBS/default.aspx">SBS</category></item><item><title>More on Update-GAC (speeding up PowerShell startup)</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/25/more-on-update-gac-speeding-up-powershell-startup.aspx</link><pubDate>Fri, 25 Jul 2008 19:00:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:343</guid><dc:creator>michael</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Jeffrey Snover of Microsoft, PowerShell dude extraordinaire, recently reminded us of a way to &lt;a class="" href="http://blogs.msdn.com/powershell/archive/2008/07/11/speeding-up-powershell-startup.aspx" target="_blank"&gt;Speed Up PowerShell Startup&lt;/a&gt; times, based on an article of over a year ago titled &lt;a class="" href="http://blogs.msdn.com/powershell/archive/2007/11/08/update-gac-ps1.aspx" target="_blank"&gt;Update-Gac.ps1&lt;/a&gt;. And yes, this does help to speed up the Exchange Management Shell and the OpsMgr Command Shell too.&lt;/p&gt;
&lt;p&gt;Taking that just a bit further, the assemblies you want to put into the GAC are slightly different when you are running AMD-64 (AMD) or EMT-64 (intel). Here is the script updated to deal with x64 and to suppress the ngen logo:&lt;/p&gt;&lt;font color="green"&gt;&lt;/font&gt;&lt;font color="green"&gt;
&lt;blockquote&gt;&lt;pre&gt;Set-Alias ngen @(
$ngen_path = Join-Path ${env:\windir} &amp;quot;Microsoft.NET\Framework&amp;quot;
$ptr_width = (gwmi -query &amp;quot;select addresswidth from win32_processor&amp;quot;).addresswidth
if ($ptr_width -eq 64) { $ngen_path += &amp;quot;64&amp;quot;; }
dir $ngen_path ngen.exe -recurse | where {$_.length -gt 0} | sort -descending lastwritetime 
)[0].fullName

[appdomain]::currentdomain.getassemblies() | %{ngen /nologo $_.location}
&lt;/pre&gt;&lt;/blockquote&gt;&lt;/font&gt;
&lt;p&gt;You should execute this script&amp;nbsp;once on each computer where you have PowerShell installed (or each time you install new PowerShell related binaries, too!).&lt;/p&gt;
&lt;p&gt;You&amp;nbsp;will not need to do this in PowerShell v2, but that is still&amp;nbsp;not here yet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=343" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/OpsMgr/default.aspx">OpsMgr</category></item><item><title>Exchange Server 2003 Security Review</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/22/exchange-server-2003-security-review.aspx</link><pubDate>Tue, 22 Jul 2008 20:34:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:339</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;The question was recently posed on a mailing list asking whether there was any book that covered the Exchange 2003 security model in depth.&lt;/p&gt;
&lt;p&gt;The question came up for the poster because of a recent video that is making the rounds on youtube and elsewhere (&lt;a href="http://www.thewebsiteisdown.com/"&gt;http://www.thewebsiteisdown.com&lt;/a&gt;). In that video, an errant system administrator deletes a message from his bosses Sent Items folder, so that the boss cannot verify that the administrator was told something specific.&lt;/p&gt;
&lt;p&gt;Can that happen??? Well - yes. And it isn&amp;#39;t unique to Exchange Server. And yes, that administrator should be fired.&lt;/p&gt;
&lt;p&gt;A savvy Exchange administrator, who also has appropriate permissions in Active Directory, can assign herself permissions at any level of an Exchange organization - per mailbox, per mailbox store, per storage group,&amp;nbsp;per server, or for the entire Exchange organization. &lt;/p&gt;
&lt;p&gt;While the backend permission sets have expanded dramatically in Exchange Server 2007, the store and user permissions are still quite similar to Exchange Server 2003. There are three whitepapers at Microsoft that can help you learn about the various permissions and how they work within themselves and within Active Directory:&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;amp;p=1&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=&amp;amp;u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d3768246d-c9ed-45d8-bece-a666143cba4e%26DisplayLang%3den" target="_blank"&gt;Exchange Server 2003 Technical Reference Guide&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;amp;p=1&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=&amp;amp;u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d0954b157-5add-48b8-9657-b95ac5bfe0a2%26DisplayLang%3den" target="_blank"&gt;Working with Active Directory Permissions in Microsoft Exchange Server 2003&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;amp;p=2&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=&amp;amp;u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d2ae266f0-16b7-40d7-94d9-c8be0e968a57%26DisplayLang%3den" target="_blank"&gt;Working with Store Permissions in Microsoft Exchange 2000&amp;nbsp;and 2003&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Another resource is &lt;a class="" href="http://www.lissware.net/" target="_blank"&gt;Alain Lissoir&amp;#39;s web site&lt;/a&gt;. Alain wrote a couple of great white papers on scripting in Exchange 2000 and 2003 and they contain some excellent security related resources.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=339" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Attribute Scoped Queries (ASQs) in PowerShell</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/21/attribute-scoped-queries-asqs-in-powershell.aspx</link><pubDate>Mon, 21 Jul 2008 23:31:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:338</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;m in the process of tech-reviewing an important book (you&amp;#39;ll want it on your shelf once it is released), and one of the things I did today was spend a while figuring out how to do Attribute Scoped Queries in PowerShell. If you develop in C# or C++, or use adfind to do your searches, those tools have supported ASQs for a long time.&lt;/p&gt;
&lt;p&gt;I use PowerShell quite a bit for Exchange Server 2007+ maintenance tasks, but I am no expert when it comes to all of the various .NET Framework classes and methods available. In the past, when you&amp;#39;ve needed to search for all the members of a particular group (using the &amp;#39;member&amp;#39; attribute) or all of the members of a particular address list (using the &amp;#39;showInAddressBook&amp;#39; attribute), those particular searches could be very slow and quite inefficient.&lt;/p&gt;
&lt;p&gt;With the Windows Server 2003 Domain Functional Level, the ASQ capability becomes available. Using a DirectorySearcher object, you can specify a particular group or a particular address book or (anything else that leads to a multi-valued attribute) and execute an efficient search against the sources to find their components. In this example, you can easily find the members of the &amp;#39;Domain Admins&amp;#39; group in your domain (note, this is an easy one - there are others that are likely more significant for you).&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;
&lt;blockquote&gt;&lt;pre&gt;$group  = New-Object System.DirectoryServices.DirectoryEntry( `
    &amp;quot;LDAP://CN=Domain Admins,CN=Users,DC=essential,DC=local&amp;quot;)
$source = New-Object System.DirectoryServices.DirectorySearcher

$source.SearchRoot  = $group
$source.SearchScope = [System.DirectoryServices.SearchScope]::Base
$source.Filter      = &amp;quot;(objectClass=*)&amp;quot;

$source.PropertiesToLoad.Add(&amp;quot;member&amp;quot;)
$source.PropertiesToLoad.Add(&amp;quot;sAMAccountName&amp;quot;)

$source.AttributeScopeQuery = &amp;quot;member&amp;quot;

$results = $source.FindAll()

$results
&lt;/pre&gt;&lt;/blockquote&gt;&lt;/font&gt;
&lt;p&gt;One caveat: when searching for members of a group, ASQ does not work for the primaryGroup! So if you do a search for &amp;quot;Domain Users&amp;quot;, it is likely that you will receive no responses in your result. This is NOT an error.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=338" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Script/default.aspx">Script</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Event 1025, Source MSExchagneIS Mailbox Store, Error 1162</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/20/event-1025-source-msexchagneis-mailbox-store-error-1162.aspx</link><pubDate>Sun, 20 Jul 2008 16:58:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:337</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;ve brought up a number of new clients on Exchange 2007 recently, and a common issue is this event log warning:&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;
&lt;blockquote&gt;&lt;pre&gt;Event Type:      Warning
Event Source:    MSExchangeIS Mailbox Store
Event Category:  General 
Event ID:        1025
Date:            7/18/2008
Time:            10:26:40 AM
User:            N/A
Computer:        EXCHANGE
Description:
An error occurred on database &amp;quot;StorageGroup\Database&amp;quot;.
 Function name or description of problem: Restrict/SetSearchCriteria
Error: 1162 Warning: fail to apply search optimization to folder (FID 4-3DBEABE)   Retrying without optimization. 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
&lt;/pre&gt;&lt;/blockquote&gt;&lt;/font&gt;
&lt;p&gt;If you spend time on Internet search engines, you&amp;#39;ll find lots of bad advice about running an Isinteg to eliminate these, or running an offline defragmentation to get rid of these. At best, those are temporary solutions. I finally had seen so many of these, I asked Microsoft about them. Here is the answer from the horse&amp;#39;s mouth:&lt;/p&gt;
&lt;blockquote&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;You have an application that is trying to perform a search using restrictions against a users search folders and this could be a time based query, etc.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;We will do two types of searches (1 fast optimized search if the indexes are there, 1 slow find) which takes a long time and will chew up processor time for store if your user has a ton of items in their folders (more than 5,000 items per folder).&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR:#1f497d;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;This is just telling you that we are performing an un-optimized search against that table in the store. They cannot be suppressed.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;In other words, ignore them. You may have users that have far too many items in their primary folders (Calendar, Tasks, Inbox, Sent Items, Deleted Items) and you can get rid of these messages if you get them to clean those up. But it may not be worth your time and energy.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=337" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>Outlook and Exchange on the same computer</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/07/06/outlook-and-exchange-on-the-same-computer.aspx</link><pubDate>Mon, 07 Jul 2008 01:01:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:325</guid><dc:creator>michael</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;In 2004, I wrote an article &lt;a class="" href="http://theessentialexchange.com/blogs/michael/archive/2007/11/13/why-can-t-i-have-outlook-and-exchange-on-the-same-computer.aspx" target="_blank"&gt;Why Can&amp;#39;t I Have Outlook and Exchange on the same Computer?&lt;/a&gt; It applied to versions of Exchange prior to Exchange Server 2007. When written, E12 (Exchange 2007) was still quite early in development at MSFT...&lt;/p&gt;
&lt;p&gt;Today, times and situations have changed.&lt;/p&gt;
&lt;p&gt;With Exchange Server 2007, in fact, the &lt;a class="" href="http://technet.microsoft.com/en-us/library/aa998579.aspx" target="_blank"&gt;export-mailbox&lt;/a&gt; command is only supported on 32-bit machines. This means that you must run export-mailbox on a 32-bit Vista or XP computer where the Exchange Management Tools have been installed, along with Outlook! Amazing.&lt;/p&gt;
&lt;p&gt;And, in fact, there are times where Outlook (or the CDO/MAPI binaries) will be required to be executed on an Exchange server to get certain tools to work, including OABinteg and MFCmapi.&lt;/p&gt;
&lt;p&gt;Prior to Exchange Server 2007, installing Outlook on an Exchange Server would replace certain DLLs that Exchange required with stub libraries that Outlook used instead. This could break Exchange severely.&lt;/p&gt;
&lt;p&gt;Those problem DLLs are gone in Exchange Server 2007. This gives us clear sailing for Outlook and Exchange on the same computer - both servers and workstations.&lt;/p&gt;
&lt;p&gt;Thanks to Dave Goldman and Ben Winzenz, both of Microsoft,&amp;nbsp;for answering my questions on this topic.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=325" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>ExtraOutlook gives you well, an extra Outlook</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/24/extraoutlook-gives-you-well-an-extra-outlook.aspx</link><pubDate>Tue, 24 Jun 2008 12:44:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:318</guid><dc:creator>michael</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Almost everyone has, at one time or another, wished that you could have multiple copies of Outlook running at the same time. After all, opening another mailbox within Outlook doesn&amp;#39;t give you windows toast and calendar pops, etc.&lt;/p&gt;
&lt;p&gt;The standard answer has always been &amp;quot;run Outlook for your primary mailbox and use OWA for all the other mailboxes&amp;quot;, which works; but well, OWA just isn&amp;#39;t Outlook.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s still the official answer.&lt;/p&gt;
&lt;p&gt;However, early this year a hacker known as &amp;quot;H.O.G.&amp;quot; (for HammerOfGod) released a tool known as &lt;a class="" href="http://www.hammerofgod.com/download.html" target="_blank"&gt;ExtraOutlook!&lt;/a&gt; This tool actually modifies the Outlook executable and causes Outlook to NOT check to see if another Outlook is running.&lt;/p&gt;
&lt;p&gt;If you are &amp;quot;plug-in free&amp;quot;, this is a great tool and it works really well. &lt;/p&gt;
&lt;p&gt;However, it confuses quite a number of plugins (such as Xonbi) that attempt to open a &amp;quot;default MAPI profile&amp;quot; and find two (or more) running instead of just one.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sure that modifying the Outlook executable puts you straight in the &amp;quot;not supported&amp;quot; arena as well. But if you need the tool - you probably don&amp;#39;t care.&amp;nbsp; :-)&lt;/p&gt;
&lt;p&gt;Give it a go. No promises, but it has worked for me.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=318" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Outlook/default.aspx">Outlook</category></item><item><title>stealing my work....grrrr....</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/20/stealing-my-work-grrrr.aspx</link><pubDate>Fri, 20 Jun 2008 16:34:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:316</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I was recently (ok, this morning) trying to find out about a vbscript (actually WMI) error that I was getting, with little success. However, in doing so, I found this forum posting: &lt;a href="http://www.tutorials-win.com/WindowsServer/Services-Windows/"&gt;http://www.tutorials-win.com/WindowsServer/Services-Windows/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This irritates me a great deal. Matheiu Chateau, whoever he is, has taken one of my scripts and taken the credit for it. &lt;/p&gt;
&lt;p&gt;I originally published that script in 2006, in my blog posting &lt;a class="" href="http://theessentialexchange.com/blogs/michael/archive/2007/11/13/finding-services-using-non-system-accounts.aspx" target="_blank"&gt;Finding Services Using non-System Accounts&lt;/a&gt;. I am MORE than happy that people use it. And I&amp;#39;m MORE than happy that other people recommend it. But doing so without giving proper credit is just wrong. If I could&amp;#39;ve located an e-mail address for him, I would&amp;#39;ve written him a scathing e-mail.&lt;/p&gt;
&lt;p&gt;grrr....&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=316" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Personal/default.aspx">Personal</category></item><item><title>Export Mailboxes Larger than 2 GB to ANSI PSTs</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/19/export-mailboxes-larger-than-2-gb-to-ansi-psts.aspx</link><pubDate>Thu, 19 Jun 2008 14:26:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:315</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I don&amp;#39;t often just link to another blog posting for MY blog posting, but this one deserves it. It&amp;#39;s not new, but last year fellow Exchange MVP Glen Scales wrote a script which allows you to export large mailboxes to ANSI PSTs.&lt;/p&gt;
&lt;p&gt;It does this by copying each item in a source mailbox to a destination PST; when the destination PST is too big (i.e., 1.8 GB in size) the PST is closed and a new one opened. So a mailbox of 10 GB would take 6 PSTs to dump.&lt;/p&gt;
&lt;p&gt;In the past, the only real way to handle this with ANSI PSTs was to manually configure a date range for archiving, or selectively export specific folders. This is a real win!&lt;/p&gt;
&lt;p&gt;So, see Glen&amp;#39;s post: &lt;a class="" href="http://gsexdev.blogspot.com/2007/01/exporting-mailbox-larger-then-2-gb-and.html" target="_blank"&gt;Exporting a mailbox larger then 2 GB and spanning it across multiple PST files with a script&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=315" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Script/default.aspx">Script</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Outlook/default.aspx">Outlook</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>"Microsoft Exchange Service Host" fails to start in Secure Exchange 2007 Environments</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/17/quot-microsoft-exchange-service-host-quot-fails-to-start-in-secure-exchange-2007-environments.aspx</link><pubDate>Tue, 17 Jun 2008 17:40:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:314</guid><dc:creator>michael</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;On Exchange Server 2007, especially post service pack 1 (I ran into this problem while installing service pack 1 update rollup 2), it appears that some of the assemblies (that is, parts of the various Exchange programs) are &amp;quot;signed with Authenticode&amp;quot;. This is basically a public/private key infrastructure (PKI) supported by Microsoft to allow people to verify that the various Exchange programs have not been tampered with.&lt;/p&gt;
&lt;p&gt;At this moment, you are either thinking &amp;quot;So what?&amp;quot; or &amp;quot;Sounds like a good idea.&amp;quot;&lt;/p&gt;
&lt;p&gt;Personally, I&amp;#39;m in the &amp;quot;sounds like a good idea&amp;quot; camp. But I&amp;#39;m not sure that the concept is fully baked.&lt;/p&gt;
&lt;p&gt;Consider this: part of any PKI infrastructure is a way to indicated when a particular key is no longer valid. Without going into too many PKI details, a key is normally called a &amp;quot;certificate&amp;quot; and the way you check the validity of a key is by seeing if the key is on a CRL - a certificate revocation list.&lt;/p&gt;
&lt;p&gt;The first time a managed and signed assembly loads, Windows Server needs to check and see whether the key (certificate) the assembly is signed with is valid. How does it do that? By checking the CRL - at Microsoft. Specifically, at&amp;nbsp;&lt;a href="http://crl.microsoft.com/pki/crl/products/CSPCA.crl"&gt;http://crl.microsoft.com/pki/crl/products/CSPCA.crl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Even if you are in the &amp;quot;sounds like a good idea&amp;quot; camp, you may be asking &amp;quot;what&amp;#39;s wrong with that&amp;quot;?&lt;/p&gt;
&lt;p&gt;So I&amp;#39;ll tell you - many environments do not allow their mailbox servers to talk to the internet (just to the hubs and to clients on specific networks). Many environments do not allow their hub transport servers to talk to the Internet (just to the mailbox and client access and e-mail gateway servers). Etc. etc. In fact, controlling and minimizing access using IPSec to specific servers has long been considered a best practice.&lt;/p&gt;
&lt;p&gt;But it won&amp;#39;t work with Exchange Server 2007 any more. When installing rollup 2 on a mailbox server, the &amp;quot;Microsoft Exchange Service Host&amp;quot; will fail to start. It will simply time out. No error messages. No log messages. No nothing.&lt;/p&gt;
&lt;p&gt;I suspect that it could be any Exchange service that has this problem. This was just the one I happened to run into.&lt;/p&gt;
&lt;p&gt;Debugging this was painful. Eventually, after a couple of hours, you do a &amp;quot;netstat -an&amp;quot; and say WTF???!!! in regards to a SYN-SENT to crl.microsoft.com and then you can start backtracking. This is not really documented directly (that is, that an Exchange server has to be able to access the Internet), but there is some information in &lt;a class="" href="http://support.microsoft.com/default.aspx/kb/944752/" target="_blank"&gt;KB 944752&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You may also find that if you are using a non-NAT proxy that this doesn&amp;#39;t work for you. More on that in my next blog post.&lt;/p&gt;
&lt;p&gt;Bottom line: after installing patches on your Exchange server, your Exchange server will have to &amp;quot;check in at home&amp;quot; before those patches can start running and you&amp;#39;ll have to enable Internet access for that to happen. After they&amp;#39;ve &amp;quot;checked in&amp;quot;, you can disable Internet access again.&lt;/p&gt;
&lt;p&gt;What a management nightmare.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;
&lt;p&gt;Update on June 19, 2008; for those folks who want for at least some of their Exchange servers to be fully isolated from the Internet, there is a workaround. See &lt;a class="" href="http://support.microsoft.com/Default.aspx?id=936707" target="_blank"&gt;KB 936707&lt;/a&gt;. However, an easier (and apparently undocumented) workaround is to put crl.microsoft.com in your local hosts file - and point it to localhost (127.0.0.1)!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=314" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Windows/default.aspx">Windows</category></item><item><title>Back from Tech-Ed IT Pro 2008</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/16/back-from-tech-ed-it-pro-2008.aspx</link><pubDate>Mon, 16 Jun 2008 20:19:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:313</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Sorry for the dead-silence this past week...between meetings and parties and certification tests and working and talking....it was a busy time at Tech-Ed.&lt;/p&gt;
&lt;p&gt;(One of my editors is peeved at me - I missed a chapter deadline too!) :-(&lt;/p&gt;
&lt;p&gt;So, I&amp;#39;m just going to ramble on here for a bit...&lt;/p&gt;
&lt;p&gt;Lots of folks say that Orlando in June is just &amp;quot;too hot&amp;quot;. I guess that depends on where you are coming from. I flew down from virginia, and I think that it was cooler in Orlando than it was in Virginia - of course, Virginia was going through a &amp;quot;heat wave&amp;quot;. But I found Orlando quite comfortable for the entire week.&lt;/p&gt;
&lt;p&gt;However - when I was doing my daily run (ok, it&amp;#39;s a jog - I about three and a half miles a day and it takes me 45 minutes - you can figure out that I&amp;#39;m slow!) - there is no question that the humidity was higher. I always sweat - but not quite so much as I did there!&lt;/p&gt;
&lt;p&gt;On Monday night, I met with an editor from O&amp;#39;Reilly Media plus a whole bunch of Active Directory folks - collectively &amp;quot;Team A/D&amp;quot; for O&amp;#39;Reilly (those that were present at Tech-Ed anyway). I&amp;#39;m doing tech.review on a couple of A/D books these days. There were some old faces and some new faces - a really good time with a bunch of geeks. Speaking of geeks - expect to hear about GEEC &amp;#39;09 this week from those fine folks at NetPro who bring you DEC (Directory Experts Conference).&lt;/p&gt;
&lt;p&gt;Tech-Ed itself ran Tuesday through Friday. I won&amp;#39;t bore you with what you&amp;#39;ve probably already read elsewhere.&lt;/p&gt;
&lt;p&gt;But, as expected, Windows 2008 was big news, IIS 7.0, and SQL 2008. Nothing surprising there. Hyper-V of course.&lt;/p&gt;
&lt;p&gt;I spent a lot of time talking about deployments, upgrades, and migrations with lots of customers. I think the message behind read-only DCs and server-core has confused a bunch of folks; as has the &amp;quot;story&amp;quot; behind Hyper-V. Many people thought that with server-core coming that they HAD to use it. And lots of folks didn&amp;#39;t understand that server-core doesn&amp;#39;t support the .NET Framework (and thus it doesn&amp;#39;t support PowerShell or the .NET extensions to IIS 7.0!).&lt;/p&gt;
&lt;p&gt;Most folks also didn&amp;#39;t understand that Hyper-V doesn&amp;#39;t do much by itself - it takes an OS to layer on top of it. oh! And NT 4.0 is &lt;strong&gt;NOT&lt;/strong&gt; supported on Hyper-V. That doesn&amp;#39;t mean it doesn&amp;#39;t work - but it isn&amp;#39;t supported (ok ok - NT 4 isn&amp;#39;t officially supported anyway - but this means that the Hyper-V folks have not &amp;quot;qualified&amp;quot; NT 4.0 to work properly on Hyper-V - if you want that, you have to stay with Virtual Server 2005).&lt;/p&gt;
&lt;p&gt;During one of my talks about upgrade/migration, I went through the entire set of domain functional levels, forest functional levels, Exchange functional levels, and how Outlook functionality was impacted. My head hurt by the time I was done with that talk. It is downright confusing by this point.&lt;/p&gt;
&lt;p&gt;I was able to meet and talk with the folks from AppAssure, who have a killer product in their Replay for Exchange. I hope to talk more about that in the future.&lt;/p&gt;
&lt;p&gt;I met with&amp;nbsp;the VP from Wiley/Sybex who signed me up for the book I&amp;#39;m working on right now. Unfortunately, I was never able to connect with my current editor for the book. :-(&lt;/p&gt;
&lt;p&gt;I also had the fine fortune to be able to meet with Tony Davis of the Simple-Talk online journal. I hope to be able to start doing some work with him soon.&lt;/p&gt;
&lt;p&gt;Unfortunately, I didn&amp;#39;t get to meet with any of my contacts with Penton Media (the Windows IT Pro/Outlook IT Pro) folks, and Diane from EMO wasn&amp;#39;t able to come to Tech-Ed this year.&lt;/p&gt;
&lt;p&gt;There were lots of new products and lots of old products. I was &lt;u&gt;shocked&lt;/u&gt; to see Syncsort. For no reason whatsoever, really. I can just remember using them in my mainframe days, over 20 years ago....they are still alive and well. I didn&amp;#39;t know they had made the transition to client/server.&lt;/p&gt;
&lt;p&gt;I took six certification tests while I was there. They offer Tech-Ed attendees a discount for taking tests onsite: $50 per test. So instead of $750 for those tests, I only paid $300. I wasn&amp;#39;t able to schedule the final one I need: 70-620 (Vista) because of scheduling conflicts but once I take that one (week after next, I think), I&amp;#39;ll also finish up the two Windows Server 2008 MCITP certifications. I&amp;#39;m already &amp;quot;MCITP: Enterprise Messaging Administrator&amp;quot;, those two&amp;nbsp;will add&amp;nbsp;&amp;quot;MCITP: Enterprise Administrator&amp;quot; and &amp;quot;MCITP: Server Administrator&amp;quot;.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m looking forward to the class-work for the Microsoft Certified Master programs. I hope they will fit in the budget of a self-employed consultant! (Check here if you haven&amp;#39;t heard about the Master&amp;#39;s programs: &lt;a href="http://www.microsoft.com/learning/mcp/master/products/default.mspx#EZ"&gt;http://www.microsoft.com/learning/mcp/master/products/default.mspx#EZ&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;After the conference I hung around Orlando for a couple of extra days just to relax. It was a good time. I look forward to it next year.&lt;/p&gt;
&lt;p&gt;Enough rambling for today. I best go try to bill a few hours tonight to help pay for this trip!&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=313" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Personal/default.aspx">Personal</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/TechEd/default.aspx">TechEd</category></item><item><title>Tech-Ed 2008</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/08/tech-ed-2008.aspx</link><pubDate>Sun, 08 Jun 2008 15:01:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:310</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Later this afternoon I&amp;#39;ll be hopping in my car and heading for the airport to travel to Orlando for &lt;a class="" href="https://www.microsoft.com/events/teched2008/itpro/default.mspx" target="_blank"&gt;Tech-Ed 2008 IT Pro&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll be part of &amp;quot;ask the experts&amp;quot;. I signed up for Exchange and PowerShell - somehow I ended up in Server 2008??!!&lt;/p&gt;
&lt;p&gt;Come by and say &amp;quot;hi&amp;quot;!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=310" width="1" height="1"&gt;</description></item><item><title>Creating Many Users with PowerShell and Admod</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/07/creating-many-users-with-powershell-and-admod.aspx</link><pubDate>Sat, 07 Jun 2008 21:30:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:309</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;One of the mailing lists I read and occaisionally post on is named ActiveDir. A lot of heavy-hitters in the AD world hang-out around there. I&amp;#39;ve learned quite a bit by lurking there.&lt;/p&gt;
&lt;p&gt;A recent poster had wanted to create a few thousand accounts for testing purposes, and have them all follow a certain format for the samaccountname, the mailnickname, and the e-mail address. That&amp;#39;s tough to do with the standard tools (if you are on Exchange 2007, with &amp;quot;new-mailuser&amp;quot; this can be done in a couple of lines of PowerShell, but the poster was on Exchange 2000).&lt;/p&gt;
&lt;p&gt;Joe Richards (&amp;#39;joe&amp;#39;), author of admod and adfind (two truly invaluable tools - if you don&amp;#39;t have them, get them), said that his admod tool was perfect for this, and offered up the following command line (you&amp;#39;ll have to scroll to the right to see it all):&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;&lt;pre&gt;admod -add -autobase 40:cn=Test,ou=test,dc=eng,dc=myco,dc=com -counterstart 23001 -bmod cn={{*cnt*}}_{{*name*}},{{*parent*}} -expand -csv -kerbenc samaccountname::{{*cnt*}}_{{*name*}} mailnickname::{{*cnt*}}_{{*name*}} unicodepwd::MyPassword1! objectclass::user useraccountcontrol::512 msExchHomeServerName::&amp;quot;::&amp;quot;/o=Org/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=mail1&amp;quot;
&lt;/pre&gt;&lt;/font&gt;
&lt;p&gt;So the basic assumption here is that 40 users are going to be created in a particular OU. The name of the users are going to be of the format 230xx_Test, the accounts are going to be enabled, have a password set, have a mailnickname set, and a particular Exchange server set. 
&lt;p&gt;(By the way - setting mailnickname and msExchHomeServerName will cause RUS to stamp a user object on Exchange 2000 and Exchange 2003. It&amp;#39;s not documented. SSSssshhhhh.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What can you say? That&amp;#39;s an amazing command line. But in his post, joe made a negative comment about PowerShell, so I had to respond. (Completely friendly rivalry there...)&lt;/p&gt;
&lt;p&gt;Here is PowerShell code to do the same thing. As I shared in my response post - it&amp;#39;s a few lines longer, but much easier to read!!! (If you wanted to do it all on one line - you could - but it would be impossible to read.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="green"&gt;&lt;pre&gt;function createUsers([string]$base,[string]$userPrefix,[string]$userSuffix,[string]$homeServer,[string]$password,[int]$baseCount,[int]$count)
{
	$objBase = [adsi](&amp;#39;LDAP://&amp;#39; + $base)
	[int]$top = $baseCount + $count
	for ([int]$i = $baseCount; $i -lt $top; $i++)
	{
		[string]$user = $userPrefix + $i.ToString() + $userSuffix
		$objUser = $objBase.Create(&amp;quot;user&amp;quot;, &amp;quot;cn=&amp;quot; + $user)
		$objUser.Put(&amp;quot;sAMAccountName&amp;quot;,       $user)
		$objUser.Put(&amp;quot;mailNickName&amp;quot;,         $user)
		$objUser.Put(&amp;quot;msExchHomeServerName&amp;quot;, $homeServer)
		$objUser.SetInfo()
		$objUser.psbase.Invoke(&amp;quot;SetPassword&amp;quot;,           $password)
		$objUser.psbase.InvokeSet(&amp;quot;useraccountcontrol&amp;quot;, 512)
		$objUser.psbase.CommitChanges()
	}
	$objBase = $null
}

createUsers &amp;#39;ou=OUtest,dc=essential,dc=local&amp;#39; &amp;#39;&amp;#39; &amp;#39;_Test&amp;#39; `
	&amp;#39;/o=First Organization/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=WIN2003-EXCH&amp;#39; `
	&amp;#39;MyPassword1!&amp;#39; 23001 4
&lt;/pre&gt;&lt;/font&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=309" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Script/default.aspx">Script</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Read-Only Domain Controller Issues</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/06/read-only-domain-controller-issues.aspx</link><pubDate>Fri, 06 Jun 2008 14:28:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:306</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Exchange has caught a lot of crap for publishing the fact that it doesn&amp;#39;t work in branch office locations where only Windows Server 2008 read-only domain controllers (RODCs) are available. Exchange simply requires read-write domain controllers. It&amp;#39;s a fact.&lt;/p&gt;
&lt;p&gt;However, it&amp;#39;s been a poorly kept secret that Windows XP and Windows Server 2003 don&amp;#39;t work well either in branch locations with only RODCs. You have needed Vista or Windows Server 2008 in those locations for all things to be happy.&lt;/p&gt;
&lt;p&gt;Until now: &lt;a class="" href="http://support.microsoft.com/Default.aspx?kbid=944043" target="_blank"&gt;Description of the Windows Server 2008 read-only domain controller compatibility pack for Windows Server 2003 clients and for Windows XP clients&lt;/a&gt;. KB 944043 fixes many of the issues with Windows XP (service pack 2 or service pack 3 only) and Windows Server 2003 (service pack 1 and service pack 2).&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=306" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Windows/default.aspx">Windows</category></item><item><title>MAPI/CDO for Windows Server 2008 and Windows Vista</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/05/mapi-cdo-for-windows-server-2008-and-windows-vista.aspx</link><pubDate>Thu, 05 Jun 2008 17:29:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:305</guid><dc:creator>michael</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you want to write client applications to run on computers that use MAPI or CDO (for example, web servers) and you don&amp;#39;t want to install (or can&amp;#39;t install) either the Outlook client or the Exchange management tools, then you need to install the MAPI/CDO libraries.&lt;/p&gt;
&lt;p&gt;These were released just last week for Windows Server 2008 and Windows Vista. You can get them &lt;a class="" href="https://www.microsoft.com/downloads/details.aspx?FamilyID=94274318-27c4-4d8d-9bc5-3e6484286b1f&amp;amp;DisplayLang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=305" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Windows/default.aspx">Windows</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Vista/default.aspx">Vista</category></item><item><title>I Had To Laugh...</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/06/04/i-had-to-laugh.aspx</link><pubDate>Wed, 04 Jun 2008 17:22:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:304</guid><dc:creator>michael</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;We consultants help each other out, of course. I know Exchange and Active Directory pretty well, but put me in front of Citrix or a big T/S farm or a PKI implementation - heck, I&amp;#39;ll scream for help without any qualms whatsoever.&lt;/p&gt;
&lt;p&gt;So, a consultant I share favors with called me this week - quite perplexed.&lt;/p&gt;
&lt;p&gt;He was working at a company and they were working on a hardware migration - Exchange Server 2003 to Exchange Server 2003. They had a 50 GB store and a few hundred mailboxes.&lt;/p&gt;
&lt;p&gt;This company had an onsite junior technician who wanted to help out, so my comrade-in-arms had given&amp;nbsp;this junior tech&amp;nbsp;a list of things to do, in order to prepare for the migration. Off the junior tech went to do them...&lt;/p&gt;
&lt;p&gt;...and he came back and said &amp;quot;all done, but would you move the mailboxes? I don&amp;#39;t feel comfortable with that....&amp;quot;&lt;/p&gt;
&lt;p&gt;So....a couple hundred mailboxes moved later, and no more mailboxes would move. &amp;lt;scratch head&amp;gt;&lt;/p&gt;
&lt;p&gt;Outlook connects, but no e-mail is being delivered to or from those folks who have been moved. &amp;lt;scratch head some more&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;investigate, investigate, investigate&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;give up&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;IM Michael on MSN Messenger...hey dude....&amp;gt;&lt;/p&gt;
&lt;p&gt;So I remote in, and five minutes later, I&amp;#39;m laughing so hard I almost split a gut.&lt;/p&gt;
&lt;p&gt;The instructions my friend had given the junior tech. included how to install Exchange Enterprise and to install service pack 2.&lt;/p&gt;
&lt;p&gt;Well, the junior tech. couldn&amp;#39;t find the media for service pack 2. So, almost correctly, the junior tech. assumed he could just install Exchange Standard and set the registry key so that it would support a larger mailbox store.&lt;/p&gt;
&lt;p&gt;So that&amp;#39;s what he did. A perfectly good Exchange Standard install and he set the &amp;quot;Database Size Limit in Gb&amp;quot; to 75 - no problem for a 50 GB store.&lt;/p&gt;
&lt;p&gt;BUT....(you knew this was coming, right?)&lt;/p&gt;
&lt;p&gt;....wait for it....&lt;/p&gt;
&lt;p&gt;he forgot to install service pack 2&lt;/p&gt;
&lt;p&gt;So the store would mount...say oops! too big....dismount.&lt;/p&gt;
&lt;p&gt;Lather, rinse, repeat.&lt;/p&gt;
&lt;p&gt;The moral of the story? Well, I guess there are a couple:&lt;/p&gt;
&lt;p&gt;1) Trust...but verify - ensure that what you think was done was actually done. Like &lt;a class="" href="http://fox.com/house/" target="_blank"&gt;Gregory House&lt;/a&gt; says, &amp;quot;People always lie.&amp;quot; I would add&amp;nbsp;- even when they don&amp;#39;t mean to (it isn&amp;#39;t always malicious).&lt;/p&gt;
&lt;p&gt;2) Use your Event log. If it is telling you things that don&amp;#39;t make sense - see moral 1. &lt;a class="" href="http://en.wikipedia.org/wiki/Occam&amp;#39;s_Razor" target="_blank"&gt;Occam&amp;#39;s Razor&lt;/a&gt; almost always applies.&lt;/p&gt;
&lt;p&gt;3) It&amp;#39;s ok to ask your friends for help. :-)&lt;/p&gt;
&lt;p&gt;Until next time...&lt;/p&gt;
&lt;p&gt;As always, if there are items you would like me to talk about, please drop me a line and let me know!&lt;/p&gt;&lt;img src="http://theessentialexchange.com/aggbug.aspx?PostID=304" width="1" height="1"&gt;</description><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://theessentialexchange.com/blogs/michael/archive/tags/Upgrade_2F00_Migration/default.aspx">Upgrade/Migration</category></item><item><title>Chapter 12 - Exchange 2003 Scripting</title><link>http://theessentialexchange.com/blogs/michael/archive/2008/05/22/chapter-12-exchange-2003-scripting.aspx</link><pubDate>Fri, 23 May 2008 01:18:00 GMT</pubDate><guid isPermaLink="false">57ea7d7e-b8c6-404f-99fb-04d07393726a:299</guid><dc:creator>michael</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;font size="7"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;&lt;font color="#000000" size="2"&gt;Over three years ago, a&amp;nbsp; particular publisher in the computer field contracted me to write a book - which I did. They paid me for it, but they chose to never publish it.&amp;nbsp;It was written&amp;nbsp;with Exchange&amp;nbsp;Server 2003 service pack 1 in mind - as you read the text, keep in mind that it was written long before E12/Exchange 2007 was even in beta. Here&amp;nbsp;is a chapter from that book. These scripts&amp;nbsp;will&amp;nbsp;usually work with Exchange Server 2007 - except when they use CDO, CDOEX, or CDOEXM.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="7"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;&lt;font color="#000000" size="2"&gt;It&amp;#39;s taken me over a week to translate this from Word 2003 to web format. It&amp;#39;s not as easy to do as I thought!&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times" size="2"&gt;You can find some earlier versions of these scripts already on the blog. The ones in this chapter tend to be a bit better implemented and debugged.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times" size="2"&gt;Enjoy!&lt;/font&gt;&lt;/p&gt;&lt;strong&gt;&lt;font size="7"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;Chapter 12&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a style="mso-comment-date:20050918T1100;"&gt;&lt;/a&gt; 
&lt;p&gt;&lt;span style="mso-comment-continuation:2;"&gt;&lt;font face="Times" color="#ff0000" size="6"&gt;Scripting Tasks&lt;/font&gt;&lt;/span&gt;&lt;span class="MsoCommentReference"&gt;&lt;span style="FONT-SIZE:8pt;COLOR:black;"&gt;&lt;span style="mso-special-character:comment;"&gt;&lt;font face="Times"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="MsoCommentReference"&gt;&lt;span style="FONT-SIZE:8pt;COLOR:black;"&gt;&lt;span style="mso-special-character:comment;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;Scripting is not magic. It is the application of a logical thought process to a problem. If you can describe the problem, there is probably a way to script a solution. However, scripting is not a panacea. It is best used for relatively discrete, often small repetitive tasks where high performance is not a key design metric. To implement a full application with scripting is challenging and supporting large scripts can also be somewhat difficult, as script-based development environments aren’t generally as rich as those for more complex languages.&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:windowtext 1pt solid;PADDING-LEFT:0in;PADDING-BOTTOM:2pt;MARGIN-LEFT:0.5in;BORDER-LEFT:medium none;MARGIN-RIGHT:0.5in;PADDING-TOP:2pt;BORDER-BOTTOM:windowtext 1pt solid;mso-border-top-alt:solid windowtext .75pt;mso-border-bottom-alt:solid windowtext .75pt;mso-element:para-border-div;"&gt;&lt;font size="2"&gt;&lt;font color="#008080"&gt;&lt;font face="Times"&gt;There are, unfortunately, things that just can’t be done in a script because Microsoft hasn’t provided interfaces to do so. But those are getting fewer and fewer with every service pack and release of software. One of the key omissions in the Windows Scripting Host is that there is no way to build GUIs without using IE (which is just a little bit difficult).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;I am going to show you some tools that I use, based on VBScript, that were developed by leveraging reusable components. A reusable component only has to be developed once. The name “reusable component” is just a fancy way of saying “a small piece of a program”. If properly designed, then this small program can then be plugged in to a larger program and used many times by many different programs. My philosophy of programming has always been “be lazy&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;only do the job once”. Some people, including myself, would refer to this as &amp;quot;being efficient&amp;quot;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;The concept of building programs with reusable components is not the same as the concept of these programs being “recipes” that you have to “cook up” to be worthwhile for your environment. For the most part, I’ve tried to ensure that they are useful to you, in and of themselves. To do that, the scripts tend to be a little bit longer than a recipe-type script might be. Don’t let that scare you off&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;just dive right in and go for it!&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;I choose to develop in VBScript, with an occasional foray into JavaScript, because the Windows Scripting Host (WSH) that includes those two languages has been built into every Windows operating system since Windows 2000. It is also available for download and installation into Windows NT 4.0 and Windows 98 (I hope you don’t run into those in your environment&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;but just in case you do, the download is at &lt;span class="MsoHyperlink"&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0a8a18f6-249c-4a72-bfcf-fc6af26dc390&amp;amp;DisplayLang=en"&gt;&lt;font color="#ff0000"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=0a8a18f6-249c-4a72-bfcf-fc6af26dc390&amp;amp;DisplayLang=en&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;). Jscript is the name of the Microsoft implementation of JavaScript. Jscript is a fairly complete language, and can be somewhat challenging to use, as a beginner. VBScript is syntactically very similar to Visual Basic, and is about as easy to learn as Visual Basic. VBScript has some limitations, but because it is so easy to learn, is used in many places.&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;The mere fact that the VBScript and JavaScript languages are included in every modern version of the Windows operating system makes them, in my mind, the tools of choice. Add to that, Internet Explorer will allow these languages to be embedded into web pages for client control, and Internet Information Server (IIS) will interpret these languages on the server for server control&lt;/span&gt;&lt;span style="mso-bidi-font-family:Times;mso-bidi-font-size:7.5pt;"&gt;—&lt;/span&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;well, they win hands down (granted, JavaScript and ECMA Script are standards and Apache has an ASP module&lt;/span&gt;&lt;span style="mso-bidi-font-family:Times;mso-bidi-font-size:7.5pt;"&gt;—&lt;/span&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;but those are add-ons and not part of the base products). There are many proponents of the cross-platform languages Perl and Python, which have a large number of modules enabling them to interface quite well with Windows. However, they require a separate install on every workstation and server that will use them and interfacing them with IIS requires a number of extra steps. On the other hand, they are fully developed languages with greater capabilities than those present in VBScript and JavaScript, with a correspondingly larger resource footprint.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;There is a comprehensive reference guide available for both VBScript and JavaScript at &lt;/span&gt;&lt;span class="MsoHyperlink"&gt;&lt;font color="#ff0000"&gt;http://microsoft.com/scripting&lt;/font&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;, along with a huge library of code samples and the truly excellent ScriptOMatic, which can help you generate scripts of almost any type. An excellent book is &lt;/span&gt;&lt;span class="emphasis"&gt;&lt;span style="COLOR:red;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;em&gt;VBScript in a Nutshell, Second Edition&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt; by Paul Lomax, &lt;u&gt;et al&lt;/u&gt; (O’Reilly Media).&lt;/span&gt;&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;The Microsoft Scripting Host (MSH), code-named Monad, will be the replacement for WSH. It is currently in beta. Support for Monad will be built into Exchange 12 and it is planned to come as an add-on to Windows Vista and Windows code-named Longhorn. However, even when Monad is released, older scripts should continue. New features may require use of Monad, but all features should continue to work for quite some time.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;Each of the scripts found in this chapter can be found at the author’s home page: &lt;a href="http://www.msmithhome.com/"&gt;http://www.msmithhome.com/&lt;/a&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; &lt;/p&gt;&lt;span style="mso-bidi-font-size:7.5pt;"&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;The permissions model for these scripts is tied directly to required permissions for Active Directory and Exchange Server. In general, any script which only uses ADSI for interrogating Active Directory may be executed by any “Authenticated User” in Active Directory. Any script which uses ADSI to update objects will require Domain Admin permission in Active Directory (or appropriate delegated permission). Any script which uses CDOEXM (and there are only a couple of those) minimally requires Exchange View Only Administrator for reading Exchange information and minimally requires Exchange Administrator for updating Exchange information.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;h1 style="MARGIN:16pt 0in 8pt;"&gt;&lt;font size="5"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;Understanding WSH&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;You will not learn everything you need to know on how to author scripts in this chapter, but you will learn something of my philosophy of writing scripts and some key points important to scripting.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;I used the phrase “reusable components” in the preceding section. In WSH, this translates to a file that is included (that is, read by the command interpreter and inserted into the program at the position where the include instruction is located) into your script. Normally, a VBScript has a file extension of VBS and a JavaScript has a file extension of JS (please note that there are certainly other extensions recognized by WSH for those files&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;another set of common extensions is VBE and JSE). Any file having either of those file extensions is considered an executable by the Windows command processor. In order to use the include-file capability, your script must end with the file extension WSF&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;Windows Script File.&lt;/font&gt;&lt;/font&gt; &lt;font size="2"&gt;&lt;font face="Times"&gt;An interesting side benefit of WSH is that it is very modular. It is possible to include multiple files into a WSF, and in fact, these files can be in different languages. It is completely possible to have multiple separate routines, in a single script, written in VBScript and JavaScript (plus any other language modules you may have installed). This is most useful when you have a bit of code written in one language that you don’t wish to rewrite, or when you need to use a feature of one language that isn’t present in the other (such as JavaScript’s sorting capabilities, which are not present in VBScript).&lt;/font&gt;&lt;/font&gt; &lt;font size="2"&gt;&lt;font face="Times"&gt;Because WSH is a command interpreter, it executes commands as it sees them. On the positive side, this allows you to initialize variables when and where they are declared. On the negative side, this allows you to author very messy scripts that are difficult to support once written.&lt;/font&gt;&lt;/font&gt; &lt;font size="2"&gt;&lt;font face="Times"&gt;Both JavaScript and VBScript really only have a single type of variable, called a variant. Each variant type will have a number of characteristics depending on the data stored in the variant. A single variable can be an object, a string, a floating point number, or an array; all in a single program. This sounds complicated, but it actually isn’t. The command processors automatically “coerce” (i.e. change) the variable as needed, whenever possible. When this can’t be done, an error will be generated.&lt;/font&gt;&lt;/font&gt; &lt;font size="2"&gt;&lt;font face="Times"&gt;An object is composed of properties and methods (when I was in school in the Stone Age, this was said this way: “an entity is composed of attributes and actions”&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;the more things change, the more they are the same). A property is a piece of data. That piece of data may be a simple variable (such as a number, a string, etc.), it may be a collection (such as an array), or it may be another object. A property can be read-only, read-write, or write-only. A method is a way of acting on that object (or some piece of the object); such as creating a object, deleting an object, etc. The important thing about objects is that they are usually specifically created with &lt;/font&gt;&lt;span class="literal"&gt;&lt;span style="mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font face="Courier New" color="#ff0000"&gt;CreateObject()&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Times"&gt; and that you access a property or method by separating the name of the object from the property or method with a period (for example, &lt;/font&gt;&lt;span class="literal"&gt;&lt;span style="mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font face="Courier New" color="#ff0000"&gt;someobj.Update&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Times"&gt;).&lt;/font&gt;&lt;/font&gt; 
&lt;h1 style="MARGIN:16pt 0in 8pt;"&gt;&lt;font size="5"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;Exchange Scripting Technologies&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;As Exchange Server has grown and matured as a product, the various tools available for modifying Exchange and its objects have grown and matured as well. These technologies include:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;CDO&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;Collaboration Data Objects&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;In the beginning, there was CDO… CDO was the first of the exposed messaging interfaces and it was much simpler to use than MAPI (although it was based on MAPI). And the capabilities were pretty limited. It was primarily good for sending email via an Exchange server. CDO also includes various incarnations known as CDONTS and CDOSYS, which are included with Windows NT 4.0 Server and above, which support the sending of SMTP email without using Exchange Server.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;CDOEX&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;CDO for Exchange&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;CDO for Exchange is an enhanced version of CDO which is available only on an Exchange server. CDOEX includes support for other Exchange objects such as folders, appointments, calendars, tasks, contacts, mailboxes, etc. Using CDOEX, you can build complete messaging applications.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;CDOWF&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;CDO for Workflow&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;Initially, Exchange Server was positioned by Microsoft as a “Lotus Notes” killer, and the work flow capabilities of Exchange were strongly pushed. CDOWF provided the work flow support in Exchange, supporting event driven work flows (e.g. if “A” happens then do “B”). CDOWF never caught on, for various reasons. As of Exchange Server 2003, CDOWF has been turned into a legacy feature (no new development, but still supported). The capabilities present in CDOWF have been absorbed and significantly expanded upon by Windows SharePoint Services.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;CDOEXM&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;CDO for Exchange Management&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;CDOEXM provides the capabilities for managing the Exchange system&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;dealing with servers, storage groups, message stores, public folder trees, etc. Each of these objects can be manipulated in various ways, such as creating, deleting, mounting, moving, etc. CDOEXM is limited in the objects it handles (it does not allow you to modify or create Address Lists or Recipient Policies for example) and a program or script using CDOEXM can only be run on a server where Exchange Server is installed or a computer where the Exchange System Management Tools are installed. Some information (particularly some message store related information) can only be accessed via CDOEXM, and not via other technologies.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;ADSI&lt;span style="mso-bidi-font-family:Times;"&gt;—Active Directory Service Interfaces&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Times" color="#008000" size="2"&gt;Not a uniquely Exchange scripting technology, ADSI provides the interfaces into &lt;/font&gt;&lt;a style="mso-comment-date:20050918T1100;"&gt;&lt;font face="Times" color="#008000" size="2"&gt;Active Directory&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;. Most of the capabilities of CDOEX and CDOEXM can be replaced with ADSI scripts. Doing so has the advantage of allowing the scripts to run on computers which do not have either Exchange Server or the Exchange Server System Management Tools installed on them. Most of the scripts shown in this chapter will use ADSI.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;ADO&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;ActiveX Data Objects&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;These components provide capabilities for accessing data from multiple places through a common interface. Both Active Directory and Exchange Server support ADO.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;WMI&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;Windows Management Instrumentation&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;WMI is the Microsoft implementation of WBEM (Web-Based Enterprise Management). Got that? WMI is simply a way for information to be presented, interrogated, and modified in an industry standard way. Both Exchange Server and Active Directory expose a large amount of their data via WMI. With Exchange Server 2003, WMI provides more access to more information than any other interface.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;Monad&lt;span style="mso-bidi-font-family:Times;"&gt;—&lt;/span&gt;Microsoft Scripting Host (MSH)&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Times"&gt;Monad is currently beta technology. However, it has been announced that Monad will contain all the capabilities of the above technologies and more. E12 (which is the codename for the version of Exchange following Exchange Server 2003) will have its ESM written based on Monad commands and routines. Therefore, all the capabilities of ESM will be available to third-party developers and administrative script writers.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;font size="2"&gt;&lt;font face="Times"&gt;With this information, you are now prepared to see some scripts.&lt;/font&gt;&lt;/font&gt; 
&lt;h1 style="MARGIN:16pt 0in 8pt;"&gt;&lt;font size="5"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;Reusable Components&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;I have developed these scripts (as indeed, I develop most of my scripts) using include files that contain some routines that I use over and over again. Doing this has a number of advantages:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="2"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font face="Times New Roman"&gt;It lets me be lazy, since I only have to develop a piece of code once.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="2"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font face="Times New Roman"&gt;It eases upgrades. If I were to find a bug (heaven forbid!) I only have to fix it in one place&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="2"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font face="Times New Roman"&gt;It speeds development. If a piece of code is already written, I don’t have to rewrite it.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="2"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font face="Times New Roman"&gt;It lets me forget. I don’t have to remember an arcane programming detail—I already figured it out once, I’ll just use it again.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;&lt;font face="Times" size="2"&gt;As you probably can see, the last three reasons are really just corollaries of the first reason. Are there &lt;/font&gt;&lt;a style="mso-comment-date:20050918T1102;"&gt;&lt;font face="Times" size="2"&gt;downsides&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;? Sure. If you are a programmer coming in to maintain someone else’s script or program that uses reusable components, you are going to have to investigate more thoroughly to ensure that you understand their “shorthand”. You also may need to copy more than a single file to another computer when moving scripts to another computer.&lt;/font&gt;&lt;/font&gt; 
&lt;h2 style="MARGIN:12pt 0in 8pt;"&gt;&lt;font color="#ff0000"&gt;&lt;font face="Times"&gt;constants.vbs&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;&lt;font face="Times" size="2"&gt;The initial file I always have in a script development &lt;/font&gt;&lt;font face="Times" size="2"&gt;project&amp;nbsp;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;is a file which contains all of my constants and pseudo-constants. These are values that either never change or probably won’t change, but may under special circumstances in a program. In VBScript, I call this &lt;span class="technicalitalic"&gt;&lt;span style="mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;em&gt;&lt;font color="#ff6600"&gt;constants.vbs&lt;/font&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;. Here is the file used in the scripts in this book:&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&amp;#39; Constants we need for ADSI calls&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const ADS_PROPERTY_CLEAR = 1&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const ADS_PROPERTY_APPEND = 3&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const ADS_PROPERTY_DELETE = 4&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" color="#008000" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&amp;#39; Constants we need for WBEM calls&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const wbemFlagReturnImmediately = &amp;amp;H10&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const wbemFlagForwardOnly = &amp;amp;H20&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" color="#008000" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&amp;#39; Constants we need for configuration&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" color="#008000" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&amp;#39; the exchange server whose default mailbox store I&amp;#39;ll use&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const ExchServer = &amp;quot;SERVER&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" color="#008000" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&amp;#39; Are we a web application or not?&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Const bWebApplication = False&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" color="#008000" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;Dim bDebug&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;/span&gt;&amp;#39; verbose output (pseudo-constant)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT:medium none;PADDING-RIGHT:0in;BORDER-TOP:medium none;PADDING-LEFT:2pt;PADDING-BOTTOM:0in;MARGIN-LEFT:0.25in;BORDER-LEFT:windowtext 1pt solid;MARGIN-RIGHT:-67.7pt;PADDING-TOP:0in;BORDER-BOTTOM:medium none;mso-element:para-border-div;mso-border-left-alt:solid windowtext .75pt;"&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#008000"&gt;&lt;font face="Courier New"&gt;bDebug = False&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;From this listing, you can determine that you’ll be seeing scripts containing modifications to Active Directory properties and that you’ll make some WMI calls. In order to run these scripts in your environment, you’ll need to specify the flat (NetBIOS) name of an Exchange server in your environment in the &lt;/font&gt;&lt;span class="literal"&gt;&lt;span style="mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font face="Courier New" color="#ff0000"&gt;ExchServer&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Times"&gt; constant. Only one script has the requirement of being run on an Exchange server.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font face="Times"&gt;With &lt;span class="bold"&gt;&lt;span style="COLOR:red;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;strong&gt;very&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; little modification, you could take most of these scripts and put them into a web-based application (using HT