<ObjectCollector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<!-- ** Type file for the Microsoft Exchange Server Best Practices Analyzer Tool (ExBPA) - Errors/Additions/Comments, please e-mail EXBPAFB@MICROSOFT.COM ** -->

	<!-- *********************************************************************  -->
	<!--  Copyright (C) 2004-2006 Microsoft Corporation. All Rights Reserved.   -->
	<!-- *********************************************************************  -->

	<_locDefinition>
		<_locDefault _loc="locNone"/>
		<_locTag _loc="locNone" _locAttrData="ChangeDescription">Configuration</_locTag>
		<_locTag _loc="locNone" _locAttrData="Text,Title,Class,LogText">Object</_locTag>
		<_locTag _loc="locNone" _locAttrData="Text,Title">Rule</_locTag>
		<_locTag _loc="locNone" _locAttrData="Text,Title">Template</_locTag>
		<_locTag _loc="locNone" _locAttrData="Name">Baseline</_locTag>
		<_locTag _loc="locNone" _locAttrData="Text,Title">RestrictionType</_locTag>
		<_locTag _loc="locNone" _locAttrData="Text,Title">Option</_locTag>
		<_locTag _loc="locNone" _locAttrData="Text,Title">Setting</_locTag>
	</_locDefinition>

	<Configuration ConfigVersion="12.10.16.1" ConfigName="E12 PreReq Checks"/>

	<Type Name="PreCheck">
		<Object Type="Group" Name="E12 Prereqs" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR,PrecheckUninstall">
			<Setting Key1="Topology Rules">
				<Rule Name="fOrgNotNativeMode" Query="$szExchangeMixedMode='True'" Text="The Exchange organization is not in native mode." Error="Error" AlwaysEvaluate="True" Role="Global" GUID="63bbe074-5dae-41b4-b71b-80ffb0b1d42b" ErrorID="1018"/>
			</Setting>
			<Setting Key1="Common Server Rules">
				<Rule Name="fServerNotWin2003" Query="$szWindowsVersion &lt;5.2 or ($szWindowsProductName='Microsoft Windows XP')" Text="This computer is not running Windows Server 2003 or later." Error="Error" AlwaysEvaluate="True" Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,Gateway,ClusterMailbox" GUID="12d3d293-b720-4e4e-856a-9a10b1c2a348" ErrorID="1001"/>
				<Rule Name="fComputerNotWinXP" Query="$szWindowsVersion &lt;5.1" Text="This computer is not running Windows XP or later." Error="Error" AlwaysEvaluate="True" Role="Global,AdminTools" GUID="12d3d293-b720-4e4e-856a-9a10b1c2a348" ErrorID="1007"/>
				<Rule Name="fComputerNotWinXPSP2" Query="$szWindowsVersion='5.1' and (not(starts-with($szWindowsSPLevel,'Service Pack')) or ($szWindowsSPLevel='Service Pack 1'))" Text="This computer is not running Windows XP Service Pack 2 or later." Error="Error" AlwaysEvaluate="True" Role="Global,AdminTools" GUID="12d3d293-b720-4e4e-856a-9a10b1c2a348" ErrorID="1009"/>
				<Rule Name="fComputerLonghornOrVista" Query="$szWindowsVersion=6.0" Error="Error" Text="Exchange 2007 cannot be used with the version of Windows operating system running on this computer." AlwaysEvaluate="True"/>
				<Rule Name="fServerNotWin2003SPn" Query="$szWindowsVersion='5.2' and not(starts-with($szWindowsSPLevel,'Service Pack'))" Text="This computer is not running Windows Server 2003 Service Pack 1 or later." Error="Error" AlwaysEvaluate="True" GUID="12d3d293-b720-4e4e-856a-9a10b1c2a348" ErrorID="1002"/>
				<Rule Name="fCannotAccessAD" Query="count($szConfigurationNamingContext)=0" Error="Error" Text="Active Directory does not exist or cannot be contacted." AlwaysEvaluate="True" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" GUID="51e5500d-8b18-4eee-bb8e-925d063b60a1" ErrorID="1032"/>
				<Rule Name="fSchemaFSMONotWin2003SPn" Query="$fWin2003FSMOSchemaServer and not($fFSMOSchemaServicePack)" Text="The schema master is not running Windows Server 2003 Service Pack 1 or later." Error="Error" AlwaysEvaluate="True" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" GUID="546fbabd-daa7-4878-9db3-0c32bc693ab4" ErrorID="1029"/>
				<Rule Name="fExchangeAlreadyInstalled" Query="count($iNewestBuild)=1 and count($szServicesPath)=1 and $iNewestBuild &lt;10000" Text="A previous version of Exchange Server is already installed on this computer. Run Exchange 2007 Setup from a different computer or remove the previous version of Exchange Server." Error="Error" AlwaysEvaluate="True" GUID="c1c58f14-0baf-4a34-b320-6bc9953612a7" ErrorID="1013"/>
				<Rule Name="fMetabaseCannotBeRead" Query="count($szKeyType)=0" Text="Unable to read data from the Metabase. Ensure that Microsoft Internet Information Services is installed." Error="Error" AlwaysEvaluate="True" Role="Mailbox,ClientAccess" GUID="a4a4d339-4009-4fb7-b842-ca2ba79f13f0" ErrorID="1014"/>
				<Rule Name="fCannotAddToGateway" Query="count($szGatewayInstallation)=1" Text="Cannot install a new server role on an existing Edge Transport installation." Error="Error" AlwaysEvaluate="True" Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,ClusterMailbox" GUID="8e77cb74-7fbe-4a7b-8308-b426b99cc931" ErrorID="1015"/>
				<Rule Name="fCannotInstallGateway" Query="count($szMailboxInstallation)=1 or count($szBridgeheadInstallation)=1 or count($szClientAccessInstallation)=1 or count($szUnifiedMessagingInstallation)=1 or count($szClusterMailboxInstallation)=1" Text="Cannot install the Edge Transport server role when other roles are already installed." Error="Error" AlwaysEvaluate="True" Role="Gateway" GUID="132c35d2-dde3-410d-8e03-6611cd0bbaec" ErrorID="1016"/>
				<Rule Name="fMSDAPv2492NotInstalled" Query="false() and $f64bit and substring($szFileVersionMSDAPS,6,4) &lt;2492" Text="This computer is running a 64-bit operating system and requires MSDAPS.DLL version 2.82.2492.0 or later. Please install the update described in Microsoft Knowledge Base article 904639 - http://go.microsoft.com/fwlink/?linkid=55328" Error="Error" AlwaysEvaluate="True" Role="Mailbox" GUID="797ca4ec-9cb3-4278-bc29-bed7cb9267fc" ErrorID="1017"/>
				<Rule Name="fTCPIPHotfixNotInstalled" Query="$f64bit and starts-with($szFileVersionTCPIPSYS, '5.2.3790.1830')" Text="This computer is running the original TCPIP.SYS driver from Windows Server 2003 Service Pack 1. Please install the update described in Microsoft Knowledge Base article 898060 - http://go.microsoft.com/fwlink/?linkid=59272" Error="Error" AlwaysEvaluate="True" Role="Mailbox,Bridgehead,Gateway,ClientAccess,UnifiedMessaging,ClusterMailbox" GUID="cce67eda-72e3-47f1-8472-2e56af15a504" ErrorID="1027"/>
				<Rule Name="fMountmgrv2443NotInstalled" Query="$szWindowsVersion ='5.2' and ($szClusSvcStarted='True') and ('%CMSSHAREDSTORAGE%'='True') and substring($szFileVersionMountmgr,10,4)&lt;2443" Error="Error" Text="This cluster node requires the update described in Microsoft Knowledge Base article 898790. Without this update you might experience volume mount point failures." AlwaysEvaluate="True" Role="Mailbox,ClusterMailbox" GUID="3bb3aada-4ae8-4ab8-8d54-ad5880918526" ErrorID="1037"/>
				<Rule Name="fW3SVCDisabledOrNotInstalled" Query="count($szW3SVCStartMode)=0 or $szW3SVCStartMode='4'" Error="Error" Text="The World Wide Web (W3SVC) service is either disabled or not installed on this computer. You must exit Setup, install the required component, then restart the Setup process." AlwaysEvaluate="True" Role="Mailbox,ClientAccess" GUID="9eeaa77f-4d46-4d9a-9c36-f262a075392b" ErrorID="1026"/>
				<Rule Name="fShouldReRunSetupForW3SVC" Query="'%IISINSTALLED%'='false' and not(count($szW3SVCStartMode)=0 or $szW3SVCStartMode='4')" Error="Error" Text="The World Wide Web (W3SVC) service is running, however, you must exit and restart Setup to continue." AlwaysEvaluate="True" Role="Mailbox,ClientAccess" GUID="9eeaa77f-4d46-4d9a-9c36-f262a075392b" ErrorID="1033"/>
				<Rule Name="fNNTPSvcInstalled" Query="count($szNNTPSvcStartMode)=1 and not($fExchangeAlreadyInstalled)" Error="Error" Text="The Network News Transport Protocol (NNTP) service is installed on this computer. This must be removed before Setup can continue." AlwaysEvaluate="True" Role="Mailbox,Bridgehead,ClientAccess,Gateway,UnifiedMessaging,ClusterMailbox" GUID="47ea666e-ae8a-4a10-9667-0ffba19dd554" ErrorID="1003"/>
				<Rule Name="fSMTPSvcInstalled" Query="count($szSMTPSvcStartMode)=1 and not($fExchangeAlreadyInstalled)" Error="Error" Text="The Simple Mail Transfer Protocol (SMTP) service is installed on this computer. This must be removed before Setup can continue." AlwaysEvaluate="True" Role="Mailbox,Bridgehead,ClientAccess,Gateway,UnifiedMessaging,ClusterMailbox" GUID="63c39cb2-3cdd-46d9-8155-60f6ab10fc4c" ErrorID="1049"/>
				<Rule Name="fClusSvcInstalledRoleBlock" Query="count($szClusSvcStartMode)=1" Error="Error" Text="The cluster service is installed on this computer. Only the Mailbox server role is supported on cluster nodes." AlwaysEvaluate="True" Role="Gateway,Bridgehead,ClientAccess,UnifiedMessaging" GUID="3ef67fb6-ece1-4a30-96df-9281a6c2f4ad" ErrorID="1004"/>
				<Rule Name="fSchemaUpdateRequired" Query="('%PREPARESCHEMA%'='true') and not($fSchemaAdmin and $fEnterpriseAdmin)" Error="Error" Text="The Active Directory Schema is not up-to-date, and this user account is not a member of the 'Schema Admins' and/or 'Enterprise Admins' group." AlwaysEvaluate="True" Role="Global" GUID="2fafe5d4-04e0-4c5a-a69f-7613d438131f" ErrorID="5001"/>
				<Rule Name="fGlobalUpdateRequired" Query="(('%PREPAREORGANIZATION%'='true') or ('%PREPAREALLDOMAINS%'='true') or ('%PREPARELEGACYEXCHANGEPERMISSIONS%'='2A7F95FC-66C6-445F-AAB9-19744C05E70E')) and not($fEnterpriseAdmin)" Error="Error" Text="Global updates need to be made to Active Directory, and this user account is not a member of the 'Enterprise Admins' group." GUID="fb97f691-d7c3-40b6-8515-95fd489db46e" AlwaysEvaluate="True" Role="Global" ErrorID="1021"/>
				<Rule Name="fDomainPrepWithoutADUpdate" Query="(count($iSchemaVersionRangeUpper)=0 or $iSchemaVersionRangeUpper &lt;10000 or count($szExchangeServersGroup)=0) and ('%PREPARESCHEMA%'='false') and ('%PREPAREORGANIZATION%'='false') and (('%PREPAREDOMAIN%'!='') or ('%PREPAREALLDOMAINS%'='true'))" Error="Error" Text="The Active Directory must be modified with 'Setup /PrepareAD' before domains can be prepared for Exchange 2007." AlwaysEvaluate="True" Role="Global" ErrorID="1063"/>

				<!-- // [82390] This rule verifies that the logged-on user has sufficient permissions to perform the /PrepareDomain operation -->
				<!-- // The user needs to have Domain Admin permissions, plus the ability to update the membership of the Exchange Servers USG (read/write on 'members' property) -->
				<!-- // The USG permissions will be automatically granted to all existing Domain Admins during the /PrepareAD phase -->
				<!-- // For domains created after the /PrepareAD phase, the administrator running /PrepareDomain will see a Setup failure message detailing the exact problem -->
				<!-- // The presence of the GUID means that Setup is requesting a local /PrepareDomain -->
				<Rule Name="fLocalDomainPrep" Query="('%PREPAREDOMAIN%'='F63C3A12-7852-4654-B208-125C32EB409A') and not(($fLocalDomainAdmin and $fHasExchangeServersUSGBasicAccess) or $fEnterpriseAdmin)" Error="Error" Text="The local domain needs to be updated. You must be a member of the 'Domain Admins' and 'Exchange Organization Administrators' group, or 'Enterprise Admins' group to continue." AlwaysEvaluate="True" Role="Global" ErrorID="1020"/>

				<Rule Name="fGlobalServerInstall" Query="not($fExOrgAdmin or $fEnterpriseAdmin or ($fServerAlreadyExists and count($fHasServerDelegatedPermsBlocked)=0))" Error="Error" Text="You must be a member of the 'Exchange Organization Administrators' or 'Enterprise Administrators' group to continue." Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,ClusterMailbox" GUID="1d750594-9222-44d7-8f80-45e522e889e6" AlwaysEvaluate="True" ErrorID="1022"/>
				<Rule Name="fNotInSchemaMasterSite" Query="(('%PREPARESCHEMA%'='true') or ('%PREPAREORGANIZATION%'='true')) and lower-case($szSiteName)!=lower-case($szFSMOSchemaSiteName) and ($szSiteName!='') and ($szFSMOSchemaSiteName!='')" Error="Error" Text="Setup needs to contact the Active Directory schema master but this computer is not in the same Active Directory site as the schema master ({3})." P3="$szFSMOSchemaSiteName" Role="Global" GUID="2376fec1-b9ce-44db-beb6-cb9ac4788988" AlwaysEvaluate="True"/>
				<Rule Name="fNotInSchemaMasterDomain" Query="(('%PREPARESCHEMA%'='true') or ('%PREPAREORGANIZATION%'='true')) and lower-case($szComputerDomainDN)!=lower-case($szFSMOSchemaDomain) and ($szComputerDomainDN!='') and ($szFSMOSchemaDomain!='')" Error="Error" Text="Setup needs to contact the Active Directory schema master but this computer is not in the same Active Directory domain as the schema master ({3})." P3="$szFSMOSchemaDomain" Role="Global" GUID="2376fec1-b9ce-44db-beb6-cb9ac4788988" AlwaysEvaluate="True"/>

				<!-- // [92107] When Setup is launched, it verifies the state of the Active Directory. If it finds problems, it'll log them but stay silent to allow pre-reqs to run -->
				<!-- // This rule surfaces the string of any Active Directory initialization error detected by Setup so that pre-reqs can report it -->
				<Rule Name="fADInitError" Query="(@S1 !='')" Error="Error" Text="{1}" S1="%ADINITERROR%" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,ClusterMailbox"/>

				<Rule Name="fProvisionedUpdateRequired" Query="('%NEWPROVISIONEDSERVERNAME%'!='') and count($szExOrgAdminAccountName)=0" Error="Error" Text="You must prepare the organization (via 'Setup /PrepareAD') before provisioning new servers." AlwaysEvaluate="True" Role="Global" ErrorID="1065"/>
				<Rule Name="fADCFound" Query="count($szADCServer)&gt;0" Error="Error" Text="One or more Active Directory Connectors have been found. Please remove all Active Directory Connectors before installing Exchange 2007." AlwaysEvaluate="True" Role="Global" GUID="bee744c9-dcf7-46a2-9a71-ab0236fa7732" ErrorID="1035"/>
				<Rule Name="fClientAccessRoleUpgrade" Query="$fClientAccessRoleInstalled" Error="Error" Text="The Client Access server role cannot be upgraded. Remove the current role using Control Panel, then install the newer version of the software." AlwaysEvaluate="True" Task="PrecheckUpgrade" Role="ClientAccess" ErrorID="1036"/>
				<Rule Name="fUnifiedMessagingRoleUpgrade" Query="$fUnifiedMessagingRoleInstalled" Error="Error" Text="The Unified Messaging server role cannot be upgraded. Remove the current role using Control Panel, then install the newer version of the software." AlwaysEvaluate="True" Task="PrecheckUpgrade" Role="UnifiedMessaging" ErrorID="1030"/>
			</Setting>
			<Setting Key1="Install Only Server Rules" Task="PrecheckInstall">
				<Rule Name="fMailboxRoleAlreadyExists" Query="$fServerAlreadyExists and $fMailboxRoleInstalled" Error="Error" Text="The Mailbox server role is already installed on this computer." AlwaysEvaluate="True" Role="Mailbox" ErrorID="2001"/>
				<Rule Name="fClientAccessRoleAlreadyExists" Query="$fServerAlreadyExists and $fClientAccessRoleInstalled" Error="Error" Text="The Client Access server role is already installed on this computer." AlwaysEvaluate="True" Role="ClientAccess" ErrorID="2002"/>
				<Rule Name="fUnifiedMessagingRoleAlreadyExists" Query="$fServerAlreadyExists and $fUnifiedMessagingRoleInstalled" Error="Error" Text="The Unified Messaging server role is already installed on this computer." AlwaysEvaluate="True" Role="UnifiedMessaging" ErrorID="2003"/>
				<Rule Name="fBridgeheadRoleAlreadyExists" Query="$fServerAlreadyExists and $fBridgeheadRoleInstalled" Error="Error" Text="The Hub Transport server role is already installed on this computer." AlwaysEvaluate="True" Role="Bridgehead" ErrorID="2004"/>
				<Rule Name="fMetabaseDefaultWebSiteCannotBeRead" Query="count($szDefaultWebSiteKeyType)=0 and not($fW3SVCDisabledOrNotInstalled)" Error="Error" Text="Unable to access the 'Default Web Site' on this computer." AlwaysEvaluate="True" Role="ClientAccess" GUID="aadc8176-1c47-49b7-83a0-9493a1093af1" ErrorID="2006"/>
				<Rule Name="fSchemaUpgradeWarning" Query="('%PREPARESCHEMA%'='true') and $iSchemaVersionRangeUpper &lt;10000" Error="Warning" Text="The Active Directory schema will be upgraded if you continue. Verify that the organization is ready for Exchange 2007 by running the Exchange 2007 Readiness Check, which is part of the Exchange Best Practices Analyzer." Role="Global"/>
				<Rule Name="f32BitNonProductionWarning" Query="count($f32bit) &gt;0" Error="Warning" Text="The 32-bit version of Exchange Server 2007 is not supported for production use." Role="Mailbox,Bridgehead,ClientAccess,Gateway,UnifiedMessaging,ClusterMailbox" GUID="fe72dfed-6138-4a9a-a3bc-f2e2c0ba2693" ErrorID="2008"/>
				<Rule Name="fWin2003Web" Query="$szWindowsVersion='5.2' and bitwise-and($iOSProductSuite,1024)" Error="Error" Text="This computer is running Windows Server 2003 Web Edition. Exchange Server 2007 is not supported on this operating system." ErrorID="2009"/>
				<Rule Name="fComputerNameDnsDomainBad" Query="$szComputerNameDnsDomain='' or count($szComputerNameDnsDomain)=0" Error="Error" Text="The fully qualified domain name of the computer is either missing or empty. Setup cannot continue." AlwaysEvaluate="True" Role="Gateway" GUID="7f28860b-0727-40ca-90b0-ecccad6ef360" ErrorID="2005"/>
				<Rule Name="fBridgeheadRoleNotPresentInSite" Query="count($szBridgeheadRoleInCurrentADSite)=0 and not(contains('%SETUPROLES%', 'Bridgehead'))" Error="Warning" Text="Setup did not detect an existing Hub Transport server role installed in Active Directory site '{1}'. Mail cannot be sent or received from this mailbox server until a Hub Transport role is installed." P1="$szSiteName" Role="Mailbox,ClusterMailbox" GUID="06197cec-f7ab-420a-9ed5-f51aa58a2673" AlwaysEvaluate="True" ErrorID="1055"/>
				<Rule Name="fClientAccessRoleNotPresentInSite" Query="count($szClientAccessRoleInCurrentADSite)=0 and not(contains('%SETUPROLES%', 'ClientAccess'))" Error="Warning" Text="Setup did not detect an existing Client Access server role installed in Active Directory site '{1}'. Outlook Web Access and Exchange ActiveSync mobile device access will not be available until a Client Access role is installed." P1="$szSiteName" Role="Mailbox,ClusterMailbox" GUID="6dcaac9f-2e10-4a65-a929-01eb8a762333" AlwaysEvaluate="True" ErrorID="1056"/>
				<Rule Name="fDelegatedMailboxFirstInstall" Query="count($szMailboxRoleInTopology)=0 and $fServerIsProvisioned and not($fExOrgAdmin)" Error="Error" Text="You must be logged-on as an Exchange organization administrator to install the first Mailbox Server role in the topology." AlwaysEvaluate="True" Role="Mailbox" GUID="e58f51fd-2c66-4a4b-914a-628dccf9a09f" ErrorID="2010"/>
				<Rule Name="fDelegatedBridgeheadFirstInstall" Query="count($szBridgeheadRoleInTopology)=0 and $fServerIsProvisioned and not($fExOrgAdmin)" Error="Error" Text="You must be logged-on as an Exchange organization administrator to install the first Hub Transport server role in the topology." AlwaysEvaluate="True" Role="Bridgehead" GUID="e58f51fd-2c66-4a4b-914a-628dccf9a09f" ErrorID="2011"/>
				<Rule Name="fDelegatedClientAccessFirstInstall" Query="count($szClientAccessRoleInTopology)=0 and $fServerIsProvisioned and not($fExOrgAdmin)" Error="Error" Text="You must be logged-on as an Exchange organization administrator to install the first Client Access server role in the topology." AlwaysEvaluate="True" Role="ClientAccess" GUID="e58f51fd-2c66-4a4b-914a-628dccf9a09f" ErrorID="2012"/>
				<Rule Name="fDelegatedUnifiedMessagingFirstInstall" Query="count($szUnifiedMessagingRoleInTopology)=0 and $fServerIsProvisioned and not($fExOrgAdmin)" Error="Error" Text="You must be logged-on as an Exchange organization administrator to install the first Unified Messaging server role in the topology." AlwaysEvaluate="True" Role="UnifiedMessaging" GUID="e58f51fd-2c66-4a4b-914a-628dccf9a09f" ErrorID="2013"/>
				<Rule Name="fClusRes2736NotInstalled" Query="$szWindowsVersion ='5.2' and ($szClusSvcStarted='True') and ('%CMSSHAREDSTORAGE%'='False') and substring($szFileVersionClusRes,10,4)&lt;2736" Error="Error" Text="This cluster node requires an update. Please install the software update as detailed in Microsoft Knowledge Base article 921181 - http://go.microsoft.com/fwlink/?LinkId=69785." AlwaysEvaluate="True" Role="ClusterMailbox" GUID="bdcf740d-1940-467b-a41d-5eac607d1dcc" ErrorID="1058"/>

				<!-- // [92011] If this is the first mailbox role install into a legacy org, then we need to provide information about OWA free/busy access from Exchange 200x servers -->
				<!-- // If the new free/busy folder isn't replicated to down-level servers, then older OWA users won't be able to see free/busy data for Exchange 2007 mailboxes. This does not apply to MAPI clients -->
				<Rule Name="fFirstPublicMDBWarning" Query="('%CREATEPUBLICDB%'='true') and count($fExchange200x) &gt;0 and count($szMailboxRoleInTopology)=0" Error="Warning" Text="If Outlook Web Access is in use, you should replicate the free/busy folder on this server to every other free/busy server in the organization. This step should be performed once Setup completes." AlwaysEvaluate="True" Role="Mailbox"/>
			</Setting>
			<Setting Key1="Install, Upgrade and DR Rules" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR">
				<Rule Name="fClusSvcNotStarted" Query="($szClusSvcStartMode=2) and ($szClusSvcStarted='False')" Error="Error" Text="The cluster service is not started on this computer. Start the cluster service and restart Setup to continue." Role="Mailbox,ClusterMailbox" ErrorID="5002"/>
				<Rule Name="fClusSingleOrNoNetwork" Query="($szClusSvcStartMode=2) and count($szClusNetworkName) &lt;2" Error="Warning" Text="This cluster has fewer than two network interfaces defined. At least one public and one private network interface is recommended." Role="Mailbox,ClusterMailbox" GUID="744ee6a8-7cda-4460-9b31-37a497f1179f" ErrorID="5003"/>
				<Rule Name="fClusDHCPInUse" Query="($szClusSvcStartMode=2) and count($fDHCPEnabled) &gt;0" Error="Warning" Text="One or more network interface is DHCP enabled. As a best practice, you should statically assign an IP address to each network interface." Role="Mailbox,ClusterMailbox" GUID="aea9d9aa-af20-4c32-8d5d-361d74975c20" ErrorID="5004"/>
				<Rule Name="fWmvcoreNotInstalled" Query="$f64bit and (count($szFileVersionWmvcore)=0 or (starts-with($szFileVersionWmvcore,'10.00.00') and substring($szFileVersionWmvcore,10,4) &lt;3802))" Error="Error" Text="This computer requires Windows Media Encoder update http://go.microsoft.com/fwlink/?LinkId=67406." GUID="f2222532-90be-4557-b394-e21c58f84f50" AlwaysEvaluate="True" Role="UnifiedMessaging" ErrorID="5005"/>
				<Rule Name="fWmspdmoxNotInstalled" Query="$f64bit and ((count($szFileVersionWmspdmod)=0 or (starts-with($szFileVersionWmspdmod,'10.00.00') and substring($szFileVersionWmspdmod,10,4) &lt;3804)) or (count($szFileVersionWmspdmoe)=0 or (starts-with($szFileVersionWmspdmoe,'10.00.00') and substring($szFileVersionWmspdmoe,10,4) &lt;3804)))" Error="Error" Text="This computer requires Windows Media Audio Voice Codec update http://go.microsoft.com/fwlink/?LinkId=67407." GUID="ec8e8d19-778d-44a2-a022-611550faa43b" AlwaysEvaluate="True" Role="UnifiedMessaging" ErrorID="5006"/>
				<Rule Name="fMSXML6NotInstalled" Query="count($szFileVersionMSXML6)=0" Error="Error" Text="This computer requires Microsoft Core XML Services (MSXML) 6.0. Please install the software from http://go.microsoft.com/fwlink/?LinkId=70796." Role="UnifiedMessaging" GUID="c0c73588-92d7-4478-8210-f51b9aa01039" AlwaysEvaluate="True"/>
				<Rule Name="fAdsiisVersionIssue" Query="starts-with($szFileVersionAdsiis,'6.0.3790.0')" Error="Error" Text="The version of '{5}' installed on this computer is not from Windows Server 2003 Service Pack 1 or later. Apply Service Pack 1 and restart Setup." S5="adsiis.dll" Role="ClientAccess,Mailbox" ErrorID="5007"/>
				<Rule Name="fIisextVersionIssue" Query="starts-with($szFileVersionIisext,'6.0.3790.0')" Error="Error" Text="The version of '{5}' installed on this computer is not from Windows Server 2003 Service Pack 1 or later. Apply Service Pack 1 and restart Setup." S5="iisext.dll" Role="ClientAccess,Mailbox" ErrorID="5008"/>
				<Rule Name="fExchange2003MinVerNotMet" Query="count($fExchange2003PreSP2) &gt;0" Error="Error" Text="One or more servers in the existing organization is running Exchange Server 2003 without Service Pack 2 (or later). Installation cannot proceed until existing Exchange Server 2003 computers are upgraded to Service Pack 2." Role="Global" ErrorID="5009"/>
				<Rule Name="fExchange2000MinVerNotMet" Query="count($fExchange2000PreSP3) &gt;0" Error="Error" Text="One or more servers in the existing organization is running Exchange 2000 Server without Service Pack 3 (or later). Installation cannot proceed until existing Exchange 2000 Server computers are upgraded to Service Pack 3." Role="Global" ErrorID="5010"/>

				<!-- // [93367] Some tasks such as Get-OwaVirtualDirectory requires metabase access. This functionality is provided by IIS Common Files -->
				<!-- // This component will be pre-installed on Mailbox and ClientAccess roles because they require IIS -->
				<!-- // For Bridgehead and UnifiedMessaging roles, we will recommend the installation of this component to provide the full admin experience -->
				<!-- // For the AdminTools role, we demand the installation of this component so that the administrator, scripts and tools can guarantee remote access -->
				<Rule Name="fIISCommonFilesNotInstalled" Query="count($szIISCommonFiles)=0" Error="Error" Text="Microsoft Internet Information Services Common Files is required. Install the component via Control Panel, Add or Remove Programs." Role="AdminTools" GUID="e06c0ec9-6323-4101-8a90-d2d432d46b91" AlwaysEvaluate="True"/>
				<Rule Name="fIISCommonFilesNotInstalledWarning" Query="count($szIISCommonFiles)=0" Error="Warning" Text="The installation of Microsoft Internet Information Services Common Files is recommended as it allows for the administration of all server roles. Install the component via Control Panel, Add or Remove Programs." Role="Bridgehead,UnifiedMessaging" GUID="e06c0ec9-6323-4101-8a90-d2d432d46b91" AlwaysEvaluate="True"/>

				<Rule Name="fPreviousBuildDetected" Query="$fMailboxPreviousBuild or $fUnifiedMessagingPreviousBuild or $fBridgeheadPreviousBuild" AlwaysEvaluate="True"/>
				<Rule Name="fADAMNotInstalled" Query="count($szADAMVersion)=0" Error="Error" Text="Active Directory Application Mode (ADAM) is not installed on this computer. You must install ADAM Service Pack 1 to proceed. This software can be downloaded from http://go.microsoft.com/fwlink/?linkid=71063." Role="Gateway" AlwaysEvaluate="True"/>

				<!-- TODO: Exchange12:32241 Prereq: Param: verifies that installation directory is not located on a cluster shared drive -->
				<Rule Name="fClusterTargetDir" Query="$fClusteredTargetDir" Error="Error" Text="You cannot install Exchange 2007 on a shared cluster drive. Please specify another install path."/>
				<!-- // [49495] Verify that the data path resides on shared storage -->
				<Rule Name="fClusterSCCSharedDataPath" Query="'%CMSSHAREDSTORAGE%'='True' and not($fClusteredCmsDataPath)" Error="Error" Text="The storage path '{0}' for a single copy cluster must be a clustered disk. Please specify a different path for the shared storage." S0="%CMSDATAPATH%" Role="ClusterMailbox" AlwaysEvaluate="True"/>
				<!-- TODO: Exchange12:49496 Prereq: Param: Checking for shared storage on passive install in a single copy cluster -->
				<Rule Name="fClusterSCCSharedGeneral" Query="false()" Text="At least one Exchange storage path ({0}) for this cluster is available on a non-clustered volume on this server. All such resources must reside on clustered volumes." S0=""/>
				<!-- TODO: Exchange12:49497 Prereq: Check the authority associated with the cluster services account -->
				<Rule Name="fClusterExchangeAuthority" Query="false()" Error="Error" Text="The cluster service account '{0}' does not have sufficient permissions to bring the Exchange Information Store online. The account should have 'Full Control' on the Exchange server object '{1}'." P0="$szClusSvcObjectName" Role="ClusteredMailbox"/>
				<!-- TODO: Exchange12:49504 Prereq:  Check that cluster services account can create a computer account or it exists -->
				<Rule Name="fClusterComputerAuthority" Query="false()" Error="Error" Text="The cluster service account '{0}' does not have sufficient permissions to create a computer account.  The account must have 'Create All Child Objects' right on the Active Directory object '{1}'." P0="$szClusSvcObjectName" S1="" Role="ClusteredMailbox"/>

				<!-- TODO: Placeholder strings for potential fixes -->
				<Rule Name="fDotNetFrameworkNeedsUpdate" Query="$f64bit and (version-compare($szFileVersionMSCorLib, '2.0.50727.235') &lt;0 or version-compare($szFileVersionMSCorWks, '2.0.50727.235') &lt;0)" Error="Error" Text="This computer requires a software update. Download and install the software from http://go.microsoft.com/fwlink/?linkid=74465." Role="Mailbox,Gateway,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools" GUID="729d1648-ff17-43f9-a1cf-4285a82d4917"/>
				<Rule Name="fUpdate2" Query="$f64bit and version-compare($szFileVersionMSDAPS, '2.82.2696.0') &lt;0" Error="Error" Text="This computer requires a software update. Download and install the software from http://go.microsoft.com/fwlink/?linkid=74467." Role="Mailbox" GUID="a7c3d273-8407-47c5-a9d4-096297abcfdd"/>
				<Rule Name="fDotNetFrameworkNeedsUpdate32" Query="$f32bit and (version-compare($szFileVersionMSCorLib, '2.0.50727.235') &lt;0 or version-compare($szFileVersionMSCorWks, '2.0.50727.235') &lt;0)" Error="Error" Text="This computer requires a software update. Download and install the software from http://go.microsoft.com/fwlink/?linkid=74469." Role="Mailbox,Gateway,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools" GUID="729d1648-ff17-43f9-a1cf-4285a82d4917"/>
				<Rule Name="fUpdate4" Query="false()" Error="Error" Text="This computer requires a software update. Download and install the software from http://go.microsoft.com/fwlink/?linkid=74470."/>
				<Rule Name="fUpdate5" Query="false()" Error="Error" Text="This computer requires a software update. Download and install the software from http://go.microsoft.com/fwlink/?linkid=74471."/>
			</Setting>
			<Setting Key1="Non-Install Server Rules" Task="PrecheckUpgrade,PrecheckDR">
				<Rule Name="fMailboxRoleNotInstalled" Query="not ($fMailboxRoleInstalled) and count($szClusSvcStartMode)=0" Error="Error" Text="The Mailbox server role is not installed on this computer." AlwaysEvaluate="True" Role="Mailbox" ErrorID="3001"/>
				<Rule Name="fUnifiedMessagingRoleNotInstalled" Query="not ($fUnifiedMessagingRoleInstalled)" Error="Error" Text="The Unified Messaging server role is not installed on this computer." AlwaysEvaluate="True" Role="UnifiedMessaging" ErrorID="3003"/>
				<Rule Name="fBridgeheadRoleNotInstalled" Query="not ($fBridgeheadRoleInstalled)" Error="Error" Text="The Hub Transport server role is not installed on this computer." AlwaysEvaluate="True" Role="Bridgehead" ErrorID="3004"/>
				<Rule Name="fUpgradeGateway605Block" Query="(substring($szExBPAAppVersion,5,6) &gt;=605.0) and (substring($szGatewayInstallation,5,6) &lt;606.0)" Error="Error" Text="Setup cannot upgrade the Edge Transport server role due to a schema incompatibility. You must remove the Edge Transport role using Control Panel." Role="Gateway" ErrorID="3005"/>
				<Rule Name="fUpgradeBridgehead578Block" Query="(substring($szExBPAAppVersion,5,6) &gt;=605.0) and (substring($szBridgeheadInstallation,5,6) &lt;578.0)" Error="Error" Text="The installed version of Exchange 2007 cannot be upgraded. You must remove the existing Hub Transport role using Control Panel." Role="Bridgehead" ErrorID="3006"/>
				<Rule Name="fUpgradeMailbox556Block" Query="(substring($szExBPAAppVersion,5,6) &gt;=605.0) and (substring($szMailboxInstallation,5,6) &lt;556.0)" Error="Error" Text="The installed version of Exchange 2007 cannot be upgraded. You must remove the existing Mailbox role using Control Panel." Role="Mailbox" ErrorID="3007"/>
			</Setting>
			<Setting Key1="Uninstall Server Rules" Task="PrecheckUninstall">
				<Rule Name="fCannotUninstallOABServer" Query="count($szOABDN)&gt;0 and count($szOtherPotentialOABServers)&gt;1" Error="Error" Text="This Mailbox server is responsible for generating an Offline Address Book. Removal of the Mailbox role is not permitted" AlwaysEvaluate="True" Role="Mailbox" GUID="d0faeb2a-79d3-4ded-aa40-20f3b187b414" ErrorID="4001"/>
				<Rule Name="fCannotUninstallUMPublishingPoint" Query="count($szRemoveUMPublishingPointException) &gt;0" Error="Error" Text="The Unified Messaging server role cannot be removed. Error: {1}" P1="$szRemoveUMPublishingPointException" Role="UnifiedMessaging" AlwaysEvaluate="True"/>
				<!-- // [77729] When removing all roles from a server, Setup removes the computer account from the Exchange Servers USG. For this, we need to pre-req sufficient permissions -->
				<!-- // We condition out AdminTools because this role is virtual and does not effect the Exchange Servers USG -->
				<Rule Name="fCannotUninstallDelegatedServer" Query="count($fServerSetupRole)=count($szServerRoleUnpacked) and count($szExchangeServersGroup) &gt;0 and not($fHasExchangeServersUSGWritePerms) and ('%SETUPROLES%'!='AdminTools')" Error="Error" Text="You must be a member of the 'Exchange Organization Administrators' group, or 'Enterprise Admins' group to remove all roles from this computer." AlwaysEvaluate="True"/>
			</Setting>

			<!-- List parameters passed by setup -->
			<Object Type="If" Name="Setup Parameters" Key1="true()">
				<Setting Key1="string('%PREREQSERVER%')" Key2="PREREQSERVER"/>
				<Setting Key1="string('%EXCHANGEVERSION%')" Key2="EXCHANGEVERSION"/>
				<Setting Key1="string('%SERVERADMIN%')" Key2="SERVERADMIN"/>
				<Setting Key1="string('%SETUPROLES%')" Key2="SETUPROLES"/>
				<Setting Key1="string('%NEWPROVISIONEDSERVERNAME%')" Key2="NEWPROVISIONEDSERVERNAME"/>
				<Setting Key1="string('%REMOVEPROVISIONEDSERVERNAME%')" Key2="REMOVEPROVISIONEDSERVERNAME"/>
				<Setting Key1="string('%TARGETDIR%')" Key2="TARGETDIR"/>
				<Setting Key1="string('%GLOBALCATALOG%')" Key2="GLOBALCATALOG"/>
				<Setting Key1="string('%DOMAINCONTROLLER%')" Key2="DOMAINCONTROLLER"/>
				<Setting Key1="string('%PREPAREDOMAIN%')" Key2="PREPAREDOMAIN"/>
				<Setting Key1="string('%FOREIGNFORESTFQDN%')" Key2="FOREIGNFORESTFQDN"/>
				<Setting Key1="string('%PREPAREORGANIZATION%')" Key2="PREPAREORGANIZATION"/>
				<Setting Key1="string('%PREPARESCHEMA%')" Key2="PREPARESCHEMA"/>
				<Setting Key1="string('%PREPAREALLDOMAINS%')" Key2="PREPAREALLDOMAINS"/>
				<Setting Key1="string('%PREPARELEGACYEXCHANGEPERMISSIONS%')" Key2="PREPARELEGACYEXCHANGEPERMISSIONS"/>
				<Setting Key1="string('%CREATEPUBLICDB%')" Key2="CREATEPUBLICDB"/>
				<Setting Key1="string('%CMSNAME%')" Key2="CMSNAME"/>
				<!-- // If Setup does not pass a value for CMSSharedStorage, it will default to False -->
				<Setting Key1="string('%CMSSHAREDSTORAGE%')" Key2="CMSSHAREDSTORAGE"/>
				<Setting Key1="string('%CMSDATAPATH%')" Key2="CMSDATAPATH"/>
				<Setting Key1="string('%CMSIPADDRESS%')" Key2="CMSIPADDRESS"/>
				<Setting Key1="string('%IISINSTALLED%')" Key2="IISINSTALLED"/>
				<Setting Key1="string(@Key3)" Key2="ADINITERROR" Key3="%ADINITERROR%"/>
			</Object>

			<!-- // Setup passes a comma-separated list of roles to BPA. We'll put these into a cache so that we can enumerate the list as individual values -->
			<Object Type="Cache" Name="SetupRoles" Key1="Add" Key2="SetupRoles" Key3="%SETUPROLES%" Key4=",">
				<Setting Key1="SetupRole">
					<Rule Name="fServerSetupRole" Query="$.!='AdminTools'"/>
				</Setting>
			</Object>

			<!-- Retrieve local ExBPA data -->
			<Object Type="Engine" Name="ExBPA Execution">
				<Setting Key1="AppVersion">
					<Rule Name="szExBPAAppVersion" Query="$."/>
				</Setting>
				<Setting Key1="DataFilename"/>
				<Setting Key1="ExecutionDirectory"/>
				<Setting Key1="ExecutionCulture"/>
			</Object>

			<!-- Retrieve the identity of the logged-on user. We use the GetUserNameEx object processor to ensure that the data is correct even when running under a Terminal Services session. -->
			<Object Type="GetUserNameEx" Name="Interactive User">
				<Setting Key1="NameFullyQualifiedDN"/>
				<Setting Key1="NameSamCompatible" Substitution="CURRENTLOGON"/>
				<Setting Key1="NameDisplay"/>
				<Setting Key1="NameDnsDomain"/>

				<!-- Verify that the logged-on user is a member of the local Administrators group. -->
				<Object Type="CheckTokenMembership" Key1="S-1-5-32-544" Name="LocalAdmin">
					<Rule Name="fNotLocalAdmin" Query="count(../Instance[@Name='LocalAdmin'])=0" Error="Error" Text="You must be logged-on as a member of the local Administrators group to continue." S1="%CURRENTLOGON%" GUID="1b304a45-c7c8-420c-8a49-df26a1e27531" ErrorID="1008"/>
				</Object>
			</Object>

			<!-- Test the remote registry service -->
			<Object Type="MonadCommand" Key1="[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, [System.Net.Dns]::GetHostEntry([System.Net.Dns]::GetHostName()).HostName)">
				<Rule Name="szRemoteRegException" Query="../Exception/@Message" Error="Error" Text="There was a problem accessing the registry on this computer. This may happen if the Remote Registry service is not running; it may also indicate a network problem." Role="Mailbox,Gateway,Bridgehead,ClientAccess,UnifiedMessaging"/>
			</Object>

			<!-- Retrieve local computer details -->
			<Object Type="GetComputerNameEx" Name="Local computer">
				<Setting Key1="ComputerNameNetBIOS"/>
				<Setting Key1="ComputerNameDnsHostname"/>
				<Setting Key1="ComputerNameDnsDomain">
					<Rule Name="szComputerNameDnsDomain" Query="$."/>
					<!--Verifies that the DNS domain of the server only contains 'A'-'Z', 'a'-'z', '0'-'9', '.' and '-'-->
					<Rule Name="fDNSDomainNameNotValid" Query="not(matches($., '^[A-Za-z0-9\-\.]*$'))" Error="Error" Text="The DNS domain name is invalid. It contains characters other than 'A'-'Z', 'a'-'z', '0'-'9', '.' and '-'." Role="Mailbox,Gateway,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" ErrorID="1028"/>
				</Setting>
				<Setting Key1="ComputerNameDnsFullyQualified">
					<Rule Name="szComputerNameDnsFullyQualified" Query="$."/>
				</Setting>
				<Setting Key1="ComputerNamePhysicalNetBIOS"/>
				<Setting Key1="ComputerNamePhysicalDnsHostname"/>
				<Setting Key1="ComputerNamePhysicalDnsDomain"/>
				<Setting Key1="ComputerNamePhysicalDnsFullyQualified"/>
			</Object>

			<!-- Connect to the well-known reg key to see if the server is responding -->
			<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Windows NT\CurrentVersion">
				<Setting Key1="CurrentVersion">
					<Rule Name="szWindowsVersion" Query="$."/>
				</Setting>

				<!-- Find out if the computer is running Service Pack 1 or above -->
				<Setting Key1="CSDVersion">
					<Rule Name="szWindowsSPLevel" Query="$."/>
				</Setting>

				<!-- Get the product name -->
				<Setting Key1="ProductName">
					<Rule Name="szWindowsProductName" Query="$."/>
				</Setting>

				<!-- Discover whether ADAM is already installed -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Windows\CurrentVersion\ADAM_Shared" Task="PrecheckInstall" Role="Gateway">
					<Setting Key1="InstalledVersion">
						<Rule Name="szADAMVersion" Query="$."/>
						<Rule Name="fOldADAMInstalled" Query="starts-with($., '1.1.3790') and substring($.,10,4) &lt;2075" Error="Error" Text="An older version of Active Directory Application Mode (ADAM) is already installed on this computer. You must update to ADAM Service Pack 1 to continue. This software can be downloaded from http://go.microsoft.com/fwlink/?linkid=71063."/>
					</Setting>
				</Object>

				<!-- // [92929] Check the ADAM service state. The Exchange-created ADAM instance needs to be running otherwise upgrades and uninstalls will fail -->
				<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_Service" Key4="Name='ADAM_MSExchange'" Task="PrecheckUpgrade,PrecheckUninstall" Role="Gateway">
					<Setting Key1="Started">
						<Rule Name="fADAMSvcStopped" Query="$.='False'" Error="Error" Text="The Active Directory Application Mode (ADAM) service must be started before Setup can continue."/>
					</Setting>
				</Object>

				<!-- Find out if SMTP is installed -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="System\CurrentControlSet\Services\SMTPSVC">
					<Setting Key1="DisplayName"/>
					<Setting Key1="Start">
						<Rule Name="szSMTPSvcStartMode" Query="$."/>
					</Setting>
				</Object>

				<!-- Verifies that the server component of Exchange is not installed -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\Setup">
					<Setting Key1="NewestBuild">
						<Rule Name="iNewestBuild" Query="$."/>
					</Setting>
					<Setting Key1="Services">
						<Rule Name="szServicesPath" Query="$."/>
					</Setting>
				</Object>

				<!-- Verifies that IIS Common Files is installed for ClientAccess role administration -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\InetStp">
					<Setting Key1="__KEYPATH">
						<Rule Name="szIISCommonFiles" Query="$."/>
					</Setting>
				</Object>

				<!--Check for metabase consistency -->
				<Object Type="Metabase" Key1="%PREREQSERVER%" Key2="LM" Timeout="%300" Role="Mailbox,ClientAccess">
					<Setting Key1="1002" Key2="KeyType">
						<Rule Name="szKeyType" Query="$."/>
					</Setting>
				</Object>
				<Object Type="Metabase" Key1="%PREREQSERVER%" Key2="LM\W3SVC\1\ROOT" Timeout="%300" Role="ClientAccess">
					<Setting Key1="1002" Key2="KeyType">
						<Rule Name="szDefaultWebSiteKeyType" Query="$."/>
					</Setting>
				</Object>
				<Object Type="Metabase" Key1="%PREREQSERVER%" Key2="LM\W3SVC\AppPools" Timeout="%300" Role="ClientAccess">
					<Setting Key1="9040" Key2="Enable32BitAppOnWin64">
						<Rule Name="fIIS32BitMode" Query="$f64bit and $.=1" Error="Error" Text="The Microsoft Internet Information Service is in 32-bit mode and this is a 64-bit computer. The mode must be changed before Setup can continue." GUID="2a3422f7-58c3-4002-b22a-22d405f70ee8" ErrorID="6021"/>
					</Setting>
				</Object>

				<!-- // Enumate the number of installed server roles on this computer -->
				<!-- // NOTE: AdminTools is excluded from this enumeration -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0" Key4="^(.*Role)$" Key5="OneLevel">
					<Setting Key1="__KEYPATH" Substitution="ROLE" SubstitutionFormat="^.*\\(.*)Role$----$1"/>
					<Setting Key1="UnpackedVersion">
						<Rule Name="szServerRoleUnpacked" Query="$."/>
					</Setting>
					<!-- [69013] Watermark residue equates to a previous Setup failure. If we see this, we need to halt Setup because the user is attempting to perform another action rather than clean up the existing problem -->
					<Setting Key1="Watermark">
						<Rule Name="szInstallWatermark" Query="$." Error="Error" Text="A Setup failure previously occurred while installing the {1} role. Either run Setup again for just this role, or remove the role using Control Panel." S1="%ROLE%" Task="PrecheckInstall,PrecheckDR"/>
					</Setting>
				</Object>

				<!--Check for Gateway installation -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0" Key4="^(EdgeTransportRole|GatewayRole)$" Key5="OneLevel">
					<Setting Key1="ConfiguredVersion">
						<Rule Name="szGatewayInstallation" Query="$."/>
					</Setting>
					<Setting Key1="UnpackedVersion">
						<Rule Name="fGatewayMinVersionCheck" Query="version-compare($.,'%EXCHANGEVERSION%') &gt;=0 and $.=$szGatewayInstallation" Error="Error" Text="The installed version of Exchange Server 2007 is the same or newer than the version you are attempting to install." Role="Gateway" Task="PrecheckInstall,PrecheckUpgrade" ErrorID="6010"/>
						<Rule Name="fGatewayUpgrade605Block" Query="version-compare($., '8.0.605.11') &lt;0 and version-compare('%EXCHANGEVERSION%', '8.0.606.0') &gt;=0" Error="Error" Text="The installed version of Exchange 2007 cannot be upgraded. You must remove the existing Edge Transport server role using Control Panel." Role="Gateway" Task="PrecheckUpgrade" ErrorID="6022"/>
					</Setting>
				</Object>

				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0\MailBoxRole">
					<Setting Key1="ConfiguredVersion">
						<Rule Name="szMailboxInstallation" Query="$."/>
					</Setting>
					<Setting Key1="UnpackedVersion">
						<Rule Name="fMailboxPreviousBuild" Query="version-compare($.,'%EXCHANGEVERSION%') &lt;0"/>
						<Rule Name="fMailboxMinVersionCheck" Query="version-compare($.,'%EXCHANGEVERSION%') &gt;=0 and not($fPreviousBuildDetected) and $.=$szMailboxInstallation" Error="Error" Text="The installed version of Exchange Server 2007 is the same or newer than the version you are attempting to install." Role="Mailbox" Task="PrecheckInstall,PrecheckUpgrade" ErrorID="6011"/>
					</Setting>
				</Object>

				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0\UnifiedMessagingRole">
					<Setting Key1="ConfiguredVersion">
						<Rule Name="szUnifiedMessagingInstallation" Query="$."/>
					</Setting>
					<Setting Key1="UnpackedVersion">
						<Rule Name="fUnifiedMessagingPreviousBuild" Query="version-compare($.,'%EXCHANGEVERSION%') &lt;0"/>
						<Rule Name="fUnifiedMessagingMinVersionCheck" Query="version-compare($.,'%EXCHANGEVERSION%') &gt;=0 and not($fPreviousBuildDetected) and $.=$szUnifiedMessagingInstallation" Error="Error" Text="The installed version of Exchange Server 2007 is the same or newer than the version you are attempting to install." Role="UnifiedMessaging" Task="PrecheckInstall,PrecheckUpgrade" ErrorID="6012"/>
					</Setting>
				</Object>

				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0\ClientAccessRole">
					<Setting Key1="ConfiguredVersion">
						<Rule Name="szClientAccessInstallation" Query="$."/>
					</Setting>
				</Object>

				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0" Key4="^(BridgeheadRole|HubTransportRole)$" Key5="OneLevel">
					<Setting Key1="ConfiguredVersion">
						<Rule Name="szBridgeheadInstallation" Query="$."/>
					</Setting>
					<Setting Key1="UnpackedVersion">
						<Rule Name="fBridgeheadPreviousBuild" Query="version-compare($.,'%EXCHANGEVERSION%') &lt;0"/>
						<Rule Name="fBridgeheadMinVersionCheck" Query="version-compare($.,'%EXCHANGEVERSION%') &gt;=0 and not($fPreviousBuildDetected) and $.=$szBridgeheadInstallation" Error="Error" Text="The installed version of Exchange Server 2007 is the same or newer than the version you are attempting to install." Role="Bridgehead" Task="PrecheckInstall,PrecheckUpgrade" ErrorID="6014"/>
						<Rule Name="fBridgeheadUpgrade605Block" Query="version-compare($., '8.0.605.11') &lt;0 and version-compare('%EXCHANGEVERSION%', '8.0.606.0') &gt;=0" Error="Error" Text="The installed version of Exchange 2007 cannot be upgraded. You must remove the existing Hub Transport server role using Control Panel." Role="Bridgehead" Task="PrecheckUpgrade" ErrorID="6023"/>
					</Setting>
				</Object>

				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0\ClusterMailboxRole">
					<Setting Key1="ConfiguredVersion">
						<Rule Name="szClusterMailboxInstallation" Query="$."/>
					</Setting>
				</Object>

				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0\AdminTools">
					<Setting Key1="__KEYPATH">
						<Rule Name="szAdminToolsInstallation" Query="$."/>
					</Setting>
				</Object>

				<!-- Check for 64-bit Operating System -->
				<Object Type="WMI" Name="DeviceID" Key1="%PREREQSERVER%" Key3="Win32_Processor">
					<Setting Key1="DataWidth">
						<Rule Name="f32bit" Query="$.=32"/>
						<Rule Name="f64bit" Query="$.=64"/>
					</Setting>
				</Object>

				<!-- Hotfix checks -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Windows\CurrentVersion">
					<Setting Key1="ProgramFilesDir" Substitution="PROGRAMFILEPATH" SubstitutionFormat="\\----\\"/>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%PROGRAMFILEPATH%\\Common Files\\System\\Ole DB\\msdaps.dll'">
						<Setting Key1="Version">
							<Rule Name="szFileVersionMSDAPS" Query="replace($.,'^(\d+\.\d+\.\d+\.\d+).*$', '$1')"/>
						</Setting>
					</Object>
				</Object>

				<!-- // Check the installed version of the .NET Framework -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\.NETFramework">
					<Setting Key1="InstallRoot" Substitution="FRAMEWORKPATH" SubstitutionFormat="\\----\\"/>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%FRAMEWORKPATH%v2.0.50727\\mscorlib.dll'">
						<Setting Key1="Version">
							<Rule Name="szFileVersionMSCorLib" Query="replace($.,'^(\d+\.\d+\.\d+\.\d+).*$', '$1')"/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%FRAMEWORKPATH%v2.0.50727\\mscorwks.dll'">
						<Setting Key1="Version">
							<Rule Name="szFileVersionMSCorWks" Query="replace($.,'^(\d+\.\d+\.\d+\.\d+).*$', '$1')"/>
						</Setting>
					</Object>
				</Object>
				
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Windows NT\CurrentVersion">
					<Setting Key1="SystemRoot" Substitution="WINDOWSPATH" SubstitutionFormat="\\----\\"/>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\Cluster\\clusres.dll'" Role="Mailbox,ClusterMailbox">
						<Setting Key1="Version">
							<Rule Name="szFileVersionClusRes" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\msxml6.dll'" Role="UnifiedMessaging">
						<Setting Key1="Version">
							<Rule Name="szFileVersionMSXML6" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\wmspdmod.dll'" Role="UnifiedMessaging">
						<Setting Key1="Version">
							<Rule Name="szFileVersionWmspdmod" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\wmspdmoe.dll'" Role="UnifiedMessaging">
						<Setting Key1="Version">
							<Rule Name="szFileVersionWmspdmoe" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\wmvcore.dll'" Role="UnifiedMessaging">
						<Setting Key1="Version">
							<Rule Name="szFileVersionWmvcore" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\drivers\\tcpip.sys'">
						<Setting Key1="Version">
							<Rule Name="szFileVersionTCPIPSYS" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\drivers\\mountmgr.sys'">
						<Setting Key1="Version">
							<Rule Name="szFileVersionMountmgr" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\inetsrv\\adsiis.dll'" Role="ClientAccess,Mailbox">
						<Setting Key1="Version">
							<Rule Name="szFileVersionAdsiis" Query="$."/>
						</Setting>
					</Object>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\system32\\inetsrv\\iisext.dll'" Role="ClientAccess,Mailbox">
						<Setting Key1="Version">
							<Rule Name="szFileVersionIisext" Query="$."/>
						</Setting>
					</Object>
				</Object>

				<!-- Find out if W3SVC is installed -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="System\CurrentControlSet\Services\W3SVC">
					<Setting Key1="Start">
						<Rule Name="szW3SVCStartMode" Query="$."/>
					</Setting>
				</Object>

				<!-- Find out if NNTPSVC is installed -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="System\CurrentControlSet\Services\NntpSvc">
					<Setting Key1="Start">
						<Rule Name="szNNTPSvcStartMode" Query="$."/>
					</Setting>
				</Object>

				<!-- // [91227] Verify that Setup is using the same DC if DSAccess has been hard-coded -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="System\CurrentControlSet\Services\MSExchange ADAccess\Instance0">
					<Setting Key1="ConfigDCHostName">
						<Rule Name="fConfigDCHostNameMismatch" Query="lower-case($.) != lower-case('%DOMAINCONTROLLER%')" Error="Error" Text="Setup cannot use domain controller '{0}' because an override is set in the registry. Run Setup again, and specify '/DomainController:{1}'." S0="%DOMAINCONTROLLER%" P1="$."/>
					</Setting>
				</Object>

				<!-- // Enumerate cluster information -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="System\CurrentControlSet\Services\ClusSvc">
					<Setting Key1="Start" Substitution="STARTMODE">
						<Rule Name="szClusSvcStartMode" Query="$."/>
						<Rule Name="iPhysicalNodesInCluster" Query="count($szNodeName)"/>
						<Rule Name="iPhysicalNodesWithExchangeInCluster" Query="count($szNodeMailboxInstallation)"/>
					</Setting>
					<Setting Key1="ObjectName">
						<Rule Name="szClusSvcObjectName" Query="$."/>
					</Setting>

					<!-- // Check the state of the Cluster Service -->
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_Service" Key4="Name='ClusSvc'">
						<Setting Key1="Started" Substitution="STARTED">
							<Rule Name="szClusSvcStarted" Query="$."/>
						</Setting>
						<!-- checks to do on cluster nodes -->
						<Object Type="If" Key1="'%STARTMODE%'='2' and '%STARTED%'='True'">
							<Object Type="Volume" Key2="%TARGETDIR%">
								<Setting Key1="IOCTL_VOLUME_IS_CLUSTERED">
									<Rule Name="fClusteredTargetDir" Query="$.=0"/>
								</Setting>
							</Object>
						</Object>
					</Object>
				</Object>

				<!-- // When installing a passive node, the 'Mailbox' role alone will be called -->
				<!-- // When installing an active node, both the 'Mailbox' and 'ClusterMailbox' roles will be called -->

				<!-- // Find out if this computer has the cluster key in the registry. If it fails the first reg open, all child objects will be skipped -->
				<!-- // Get the name of the local cluster from the registry -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Cluster" Role="Mailbox,ClusterMailbox">
					<Setting Key1="ClusterName">
						<!-- // [99003] The following rule ensure that a passive is always available within the cluster -->
						<!-- // The first portion of the query covers the case where the administrator is attempting to create a CMS on an existing passive -->
						<!-- // The second portion of the query covers the case where the administrator is attempting to install Exchange on a new cluster node -->
						<Rule Name="fTooManyActiveNodes" Query="(count($szExchangeStoreResource)!=0) and ((count($szExchangeStoreResource) &gt;=($iPhysicalNodesWithExchangeInCluster -1) and count($szMailboxInstallation) &gt;0) or (count($szExchangeStoreResource) &gt;=($iPhysicalNodesWithExchangeInCluster) and count($szMailboxInstallation)=0))" Error="Error" Text="Cannot create a new Active Cluster Mailbox role. At least one node in the cluster must be passive." Role="ClusterMailbox" Task="PrecheckInstall" AlwaysEvaluate="True"/>
						<Rule Name="fResourcesWillBeMoved" Query="($iPhysicalNodesWithExchangeInCluster &gt;1) and count($fClusterResourceOnline)=0 and count($fClusterResourceOffline) &gt;0" Error="Warning" Text="Cluster managed services owned by this node will be failed-over to another node while Setup is performing its tasks." Role="Mailbox" Task="PrecheckInstall,PrecheckUpgrade"/>
						<Rule Name="fResourcesNeedToBeOffline" Query="($iPhysicalNodesWithExchangeInCluster &gt;1) and count($fClusterResourceOnline) &gt;0" Error="Error" Text="Before Setup can continue, all cluster managed services owned by this node need to be taken offline or preferably moved to another node in the cluster." Role="Mailbox" Task="PrecheckInstall,PrecheckUpgrade"/>
						<Rule Name="fSingleNodeResourcesNeedToBeOffline" Query="($iPhysicalNodesWithExchangeInCluster=1) and count($fClusterResourceOnline) &gt;0" Error="Error" Text="Before Setup can continue, all cluster managed services owned by this node need to be taken offline." Role="Mailbox" Task="PrecheckUpgrade"/>
						<Rule Name="fPassiveUninstallButCMSPresent" Query="not(contains('%SETUPROLES%','ClusterMailbox')) and count($fLocalExchangeStoreResource) &gt;0" Error="Error" Text="Cannot remove Exchange files from this computer because Exchange clustered management services are owned by this node." Role="Mailbox" Task="PrecheckUninstall"/>
						<Rule Name="fFileShareWitnessNotConfigured" Query="('%CMSSHAREDSTORAGE%'='False') and ($iPhysicalNodesInCluster=2) and not($szMNSFileShare) and not($fClusterStorageTypeNotCCR)" Error="Error" Text="A file share witness has not been configured. Set the 'MNSFileShare' value, move the cluster group twice and attempt the Setup operation again." Role="ClusterMailbox" Task="PrecheckInstall,PrecheckDR" AlwaysEvaluate="True"/>

						<!-- // [93427] For CCR configurations, only one CMS per cluster is permitted -->
						<Rule Name="fOnlyOneCCRCMSAllowed" Query="('%CMSSHAREDSTORAGE%'='False') and count($szExchangeStoreResource) &gt;0" Error="Error" Text="Only one Cluster Continuous Replication server can exist in the cluster." Role="ClusterMailbox" Task="PrecheckInstall"/>
					</Setting>

					<!-- // Obtain a list of all nodes in the cluster and enumerate basic information about the name and OS version -->
					<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Cluster\Nodes" Key4=".*">
						<Setting Key1="NodeName" Substitution="NODENAME">
							<Rule Name="szNodeName" Query="$."/>
						</Setting>
						<Setting Key1="BuildNumber"/>
						<Setting Key1="CSDVersion"/>
						<Setting Key1="__KEYPATH" Substitution="NODEKEY"/>

						<!-- // For each Exchange node in the cluster, check that the registry is accessible -->
						<Object Type="Registry" Key1="%PREREQSERVER%" Key3="%NODEKEY%\Parameters">
							<Setting Key1="MSExchange_NodeState" Substitution="NODESTATE"/>
							<Object Type="If" Key1="'%NODESTATE%'!='0'">
								<Object Type="Registry" Key1="%NODENAME%" Key3="Software\Microsoft\Windows NT\CurrentVersion">
									<Rule Name="fRedundantMachineUnreachable" Query="count(../Exception) &gt; 0" Error="Error" Text="The registry for server {3} could not be accessed remotely. When you run Exchange Server 2007 Setup, all nodes in a cluster that are running Exchange 2007 must be available. Error: {1}" P1="../Exception/@Message" S3="%NODENAME%" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR" Role="Mailbox,ClusterMailbox"/>
								</Object>
							</Object>
						</Object>

						<!-- // For each node in the cluster, perform the following actions -->
						<!-- // Verify that the node is reachable -->
						<Object Type="Registry" Key1="%NODENAME%" Key3="Software\Microsoft\Windows NT\CurrentVersion">
							<Rule Name="szNodeRegConnectException" Query="string(../Exception/@Message)" Error="Warning" Text="Setup failed to contact cluster node '{2}'. Verify that this node is operational. Error: {1}." P1="string(../Exception/@Message)" S2="%NODENAME%"/>
							<Setting Key1="CurrentVersion">
								<Rule Name="szWindowsVersionNode" Query="$."/>
							</Setting>
							<Setting Key1="SystemRoot" Substitution="WINDOWSPATH" SubstitutionFormat="\\----\\"/>

							<!-- // Verify that other nodes in the cluster have the file share witness fix if this is a CCR installation -->
							<Object Type="WMI" Key1="%NODENAME%" Key3="CIM_Datafile" Key4="name = '%WINDOWSPATH%\\Cluster\\clusres.dll'">
								<Setting Key1="Version">
									<Rule Name="fNodeClusRes2736NotInstalled" Query="lower-case($szNodeName) != lower-case($szLocalNodeName) and ($iPhysicalNodesInCluster=2) and count($szMNSFileShare) &gt;0 and ($szWindowsVersionNode='5.2') and substring($szFileVersionClusRes,10,4)&lt;2736" Error="Error" Text="Cluster node '{2}' requires an update. Please install the software update as detailed in Microsoft Knowledge Base article 921181 (http://go.microsoft.com/fwlink/?LinkId=69785)." S2="%NODENAME%" Role="ClusterMailbox" GUID="bdcf740d-1940-467b-a41d-5eac607d1dcc"/>
								</Setting>
							</Object>

							<!-- // Verify that Exchange binaries are in the same path on all nodes in the cluster. If a node doesn't have Exchange installed, this check will be skipped -->
							<Object Type="Registry" Key1="%NODENAME%" Key3="Software\Microsoft\Exchange\Setup">
								<Setting Key1="Services">
									<Rule Name="fTargetPathMismatch" Query="lower-case($.) != lower-case('%TARGETDIR%')" Error="Error" Text="The target path specified ({1}) does not match the existing Exchange install path ({5}) on cluster node '{2}'." S1="%TARGETDIR%" P2="$szNodeName" P5="$." Role="Mailbox" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR"/>
								</Setting>
							</Object>

							<!-- // Retrieve the version and build of Exchange on the node -->
							<Object Type="Registry" Key1="%NODENAME%" Key3="Software\Microsoft\Exchange\v8.0\MailboxRole">
								<Setting Key1="ConfiguredVersion">
									<Rule Name="szNodeMailboxInstallation" Query="$."/>
								</Setting>
							</Object>
						</Object>
					</Object>

					<!-- // Enumerate cluster network information -->
					<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Cluster\Networks" Key4=".*">
						<Setting Key1="Name">
							<Rule Name="szClusNetworkName" Query="$."/>
						</Setting>
					</Object>

					<!-- // Enumerate existing Exchange Store resources in the cluster -->
					<Object Type="WMI" Key1="%PREREQSERVER%" Key2="root\MSCluster" Key3="MSCluster_Resource" Key4="Type='Microsoft Exchange Information Store'">
						<Setting Key1="Name">
							<Rule Name="szExchangeStoreResource" Query="$."/>
						</Setting>
					</Object>

					<!-- // Retrieve the physical computer name (that is, the physical node name) -->
					<Object Type="GetComputerNameEx" Name="Node">
						<Setting Key1="ComputerNamePhysicalNetBIOS" Substitution="LOCALNODENAME">
							<Rule Name="szLocalNodeName" Query="$."/>
						</Setting>

						<!-- // Enumerate the list of cluster resources homed on the local node; this includes online and offline resources -->
						<Object Type="WMI" Key1="%PREREQSERVER%" Key2="root\MSCluster" Key3="MSCluster_NodeToActiveResource" Key4="GroupComponent='MSCluster_Node.Name=&quot;%LOCALNODENAME%&quot;'">
							<Setting Key1="PartComponent" SubstitutionFormat="^MSCluster_Resource.Name=&quot;(?'resource'.*)&quot;$----${resource}" Substitution="RESOURCENAME"/>

							<!-- // Enumerate the state of the resources homed on the local node -->
							<!-- // 1 = Initializing; 2 = Online; 3 = Offline; 4 = Failed; 5 = Pending; 6 = Online Pending; 7 = Offline Pending; 8 = Unknown -->
							<Object Type="WMI" Key1="%PREREQSERVER%" Key2="root\MSCluster" Key3="MSCluster_Resource" Key4="Name='%RESOURCENAME%'">
								<Setting Key1="Name"/>
								<Setting Key1="State">
									<Rule Name="fClusterResourceOnline" Query="($.=2 or $.=5 or $.=6 or $.=7 or $.=8) and not($fLocalPhysicalDiskResource)"/>
									<Rule Name="fClusterResourceOffline" Query="$.=3 or $.=4"/>
								</Setting>
								<Setting Key1="Type">
									<Rule Name="fLocalExchangeStoreResource" Query="$.='Microsoft Exchange Information Store'"/>
									<Rule Name="fLocalPhysicalDiskResource" Query="$.='Physical Disk'"/>
								</Setting>
							</Object>
						</Object>
					</Object>

					<!-- // Find the MNSFileShare path for the Majority Node Set resource using registry search. File share witness only applies to (precisely) 2 node clusters -->
					<!-- // First of all we'll attempt to find the Majority Node Set resource (which will hiding under a dynamically-generated GUID) -->
					<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Cluster\Resources" Key4=".*" Key5="OneLevel">
						<Setting Key1="__KEYPATH" Substitution="KEYPATH"/>
						<Setting Key1="Type" Substitution="RESOURCENAME"/>

						<!-- // Now we'll look under the Parameters subkey to find the MNSFileShare REG_SZ -->
						<Object Type="If" Key1="'%RESOURCENAME%'='Majority Node Set'">
							<Object Type="Registry" Key1="%PREREQSERVER%" Key3="%KEYPATH%\Parameters">
								<Setting Key1="MNSFileShare" Substitution="MNSFILESHARE">
									<Rule Name="szMNSFileShare" Query="$."/>
									<Rule Name="fMNSFileShareNotUNC" Query="($iPhysicalNodesInCluster=2) and not(starts-with($.,'\\'))" Error="Error" Text="The 'MNSFileShare' path is invalid. The value must be a full UNC path such as \\server\sharename. Current value: {1}." P1="$." Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR"/>
									<Rule Name="fFileShareWitnessNotInEffect" Query="($iPhysicalNodesInCluster!=2)" Error="Warning" Text="The 'MNSFileShare' path exists but {9} node(s) exist in the cluster. The majority node set with file share witness facility only works with two node clusters." P9="$iPhysicalNodesInCluster" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR"/>

									<!-- // The following rule attempts to catch the case where you are installing a passive node as the first node in the cluster and intend to perform CCR -->
									<Rule Name="fMailboxClusRes2736NotInstalled" Query="($iPhysicalNodesInCluster=2) and ($szWindowsVersion='5.2') and substring($szFileVersionClusRes,10,4)&lt;2736" Error="Error" Text="This cluster node requires an update. Please install the software update as detailed in Microsoft Knowledge Base article 921181 (http://go.microsoft.com/fwlink/?LinkId=69785)." Role="Mailbox"/>
								</Setting>

								<!-- // Verify that the MNSFileShare path actually exists -->
								<Object Type="MonadCommand" Key1="test-path '%MNSFILESHARE%'">
									<Setting Key1="__THIS">
										<Rule Name="fMNSFileShareDoesNotExist" Query="false() and ($iPhysicalNodesInCluster=2) and $.='False'" Error="Warning" Text="The 'MNSFileShare' path cannot be verified. This may be due to the current account not having access to the file share. Check that path '{1}' exists and is accessible via the cluster services account." S1="%MNSFILESHARE%" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR"/>
									</Setting>
								</Object>
							</Object>
						</Object>
					</Object>

					<!-- // Verify that the CMSDATAPATH actually exists. It's good practice to design the disk layout and folders up-front -->
					<!-- // In SCC clusters, the CMSDATAPATH needs to reside on shared storage -->
					<!-- // In CCR clusters, it's okay for CMSDATAPATH to reside on a local disk -->
					<Object Type="MonadCommand" Key1="test-path '%CMSDATAPATH%'" Role="ClusterMailbox" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR">
						<Setting Key1="__THIS" Substitution="CMSDATAPATHEXISTS">
							<Rule Name="fCMSDataPathDoesNotExist" Query="$.='False'" Error="Warning" Text="Data path '{1}' does not exist. This folder should be created before proceeding with the installation." S1="%CMSDATAPATH%"/>

							<!-- // Verify that the CMSDATAPATH is not a UNC path -->
							<Rule Name="fCMSDataPathIsUNC" Query="starts-with('%CMSDATAPATH%', '\\')" Error="Error" Text="Data path '{1}' is invalid. The path must be specified using a drive letter assignment (e.g. s:\data)" S1="%CMSDATAPATH%"/>
						</Setting>

						<!-- If the CMSDATAPATH is accessible, we should perform some basic tests on the filesystem. First of all, we need to escape the backslashes in the path before we can call WMI -->
						<Object Type="If" Key1="'%CMSDATAPATHEXISTS%'='True'">
							<Setting Key1="string('%CMSDATAPATH%')" Substitution="CMSDATAPATHESCAPED" SubstitutionFormat="\\----\\"/>

							<!-- // Use WMI to verify the file system attributes of the CMSDATAPATH -->
							<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_Directory" Key4="name='%CMSDATAPATHESCAPED%'">
								<Setting Key1="FSName">
									<Rule Name="fCMSDataPathNonNTFS" Query="$.!='NTFS'" Error="Error" Text="Data path '{1}' resides on a non-NTFS volume. The volume must be converted to NTFS before Setup can continue." S1="%CMSDATAPATH%"/>
								</Setting>
								<!-- // Verify that the volume is writeable. This won't catch the case where the installer has been restricted through file permissions -->
								<Setting Key1="Writeable">
									<Rule Name="fCMSDataPathNotWriteable" Query="$.='False'" Error="Error" Text="Data path '{1}' is not writeable. Databases can only exist on writeable storage media." S1="%CMSDATAPATH%"/>
								</Setting>
							</Object>
							<Object Type="Volume" Key2="%CMSDATAPATH%">
								<Setting Key1="IOCTL_VOLUME_IS_CLUSTERED">
									<Rule Name="fClusteredCmsDataPath" Query="$.=0"/>
								</Setting>
							</Object>
						</Object>
					</Object>
				</Object>

				<!-- // Call internal CMSO validation logic to verify that cluster tasks will succeed -->
				<!-- // For new installs -->
				<Object Type="MonadCommand" Key1="New-ClusteredMailboxServerObjects -DomainController:'%DOMAINCONTROLLER%' -Name:'%CMSNAME%' -IPAddress:'%CMSIPADDRESS%' -SharedStorage:$%CMSSHAREDSTORAGE% -DataPath:'%CMSDATAPATH%' -whatif" Role="ClusterMailbox" Task="PrecheckInstall">
					<Rule Name="szNewClusteredMailboxServerObjectsException" Query="../Exception/@Message" Error="Error" Text="Clustered Mailbox Server installation cannot continue: {1}" P1="../Exception/@Message"/>
				</Object>
				<!-- // For disaster recovery installs -->
				<Object Type="MonadCommand" Key1="New-ClusteredMailboxServerObjects -DomainController:'%DOMAINCONTROLLER%' -Name:'%CMSNAME%' -IPAddress:'%CMSIPADDRESS%' -SharedStorage:$%CMSSHAREDSTORAGE% -DataPath:'%CMSDATAPATH%' -DisasterRecovery:$true -whatif" Role="ClusterMailbox" Task="PrecheckDR">
					<Rule Name="szNewDRClusteredMailboxServerObjectsException" Query="../Exception/@Message" Error="Error" Text="Clustered Mailbox Server installation cannot continue: {1}" P1="../Exception/@Message"/>
				</Object>
				<!-- // For build to build upgrades - TODO: Disabled because further testing is required -->
				<Object Type="MonadCommand" Key1="Upgrade-ClusteredMailboxServerObjects -DomainController:'%DOMAINCONTROLLER%' -Name:'%CMSNAME%' -IPAddress:'%CMSIPADDRESS%' -SharedStorage:$%CMSSHAREDSTORAGE% -DataPath:'%CMSDATAPATH%' -whatif" Role="ClusterMailbox" Task="PrecheckUpgrade">
					<Rule Name="szUpgradeClusteredMailboxServerObjectsException" Query="false() and ../Exception/@Message" Error="Error" Text="Clustered Mailbox Server installation cannot continue: {1}" P1="../Exception/@Message"/>
				</Object>
				<!-- // For uninstalls - TODO: Disabled because further testing is required -->
				<Object Type="MonadCommand" Key1="Remove-ClusteredMailboxServerObjects -DomainController:'%DOMAINCONTROLLER%' -Name:'%CMSNAME%' -IPAddress:'%CMSIPADDRESS%' -SharedStorage:$%CMSSHAREDSTORAGE% -DataPath:'%CMSDATAPATH%' -whatif" Role="ClusterMailbox" Task="PrecheckUninstall">
					<Rule Name="szRemoveClusteredMailboxServerObjectsException" Query="false() and ../Exception/@Message" Error="Error" Text="Clustered Mailbox Server installation cannot continue: {1}" P1="../Exception/@Message"/>
				</Object>

				<!-- Enumerate network information -->
				<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_NetworkAdapter" Key4="AdapterTypeID='0'" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR">
					<Setting Key1="Caption" Substitution="NICCAPTION"/>
					<Object Type="WMI" Name="Caption" Key1="%PREREQSERVER%" Key3="Win32_NetworkAdapterConfiguration" Key4="Caption='%NICCAPTION%'">
						<Setting Key1="DHCPEnabled">
							<Rule Name="fDHCPEnabled" Query="$.='True'"/>
						</Setting>
						<Setting Key1="DNSServerSearchOrder" Substitution="DNSADDRESS" SubstitutionFormat="^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*$----$1;"/>
						<Object Type="Cache" Name="DNSOrder" Key1="Add" Key2="DNSAddr-%PREREQSERVER%" Key3="%DNSADDRESS%" Display="Hide">
							<Setting Key1="DNSAddr" Substitution="PRIMARYDNS" SubstitutionFormat="^(.*?);.*----$1"/>
							<Object Type="Port" Name="Primary DNS Alive" Key1="%PRIMARYDNS%">
								<Setting Key1="53">
									<Rule Name="fPrimaryDNSTestFailed" Query="not ($.[2]='53 Available')" Error="Warning" Text="Setup cannot contact the primary DNS server ({3}) using TCP port 53. Check that the IP address of the DNS server is correct and that the DNS server is reachable." S3="%PRIMARYDNS%" GUID="2fcc99e5-6c19-4ad0-8c7a-7b77dbc3fe1b" ErrorID="1040"/>
								</Setting>
							</Object>
							<Object Type="GetComputerNameEx" Name="Local computer">
								<Setting Key1="ComputerNameDnsFullyQualified" Substitution="LOCALFQDN"/>
								<Object Type="DNS" Name="DNS" Key1="%PRIMARYDNS%" Key2="%LOCALFQDN%">
									<Setting Key1="A">
										<Rule Name="fHostRecordMissing" Query="$.[4]='DNS Query Result = '" Error="Warning" Text="Setup cannot verify that the 'Host' (A) record for this computer exists within the DNS database on server {3}." S3="%PRIMARYDNS%" Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" GUID="ecf66997-d80e-4d0f-9e6a-1a942c92a8d9" ErrorID="1041"/>
									</Setting>
									<Object Type="Cache" Name="DNSOrder" Key1="Delete" Key2="DNSAddr-%PREREQSERVER%" Display="Hide"/>
								</Object>
							</Object>
						</Object>
					</Object>
				</Object>

				<!-- Find out if we're going to hit a problem with upgrades of the search service on Mailbox servers -->
				<Object Type="MonadCommand" Key1="test-MSFTEInstall" Task="PrecheckUpgrade" Role="Mailbox">
					<Setting Key1="MSFTEInstallUserName" Substitution="MSFTEUSER"/>
					<Setting Key1="CanCurrentUserUpgrade">
						<Rule Name="fMSFTEUpgradeIssue" Query="$.='False'" Error="Error" Text="The Microsoft Search service cannot be upgraded by the logged-on user. Please logon as user '{1}' and retry the upgrade operation." S1="%MSFTEUSER%" ErrorID="5005"/>
					</Setting>
				</Object>

				<!-- Find out if there are any messages in the queues -->
				<Object Type="MonadCommand" Key1="get-Queue" Task="PrecheckUninstall" Role="Bridgehead,Gateway">
					<Setting Key1="Identity" Substitution="QUEUENAME"/>
					<Setting Key1="MessageCount">
						<Rule Name="fMessagesInQueue" Query="$. &gt;0" Error="Warning" Text="There are {9} messages waiting in the '{1}' queue. Proceeding with the removal of the server role may result in data loss." S1="%QUEUENAME%" P9="$." AlwaysEvaluate="True" Role="Bridgehead,Gateway" GUID="b9601fab-3a58-4b55-8f07-cf874dd122a2" ErrorID="4003"/>
					</Setting>
				</Object>

				<!-- Test ADAM port availability for Gateway installs -->
				<Object Type="Port" Name="ADAM Port" Key1="%PREREQSERVER%" Task="PrecheckInstall" Role="Gateway">
					<Setting Key1="%ADAMPORT%">
						<Rule Name="fADAMPortAlreadyInUse" Query="not(contains($.[2],'Not Available'))" Error="Error" Text="Active Directory Application Mode (ADAM) service instance installation cannot proceed. Port {7} is already in use." S7="%ADAMPORT%" GUID="00dbc109-989b-4894-a36d-017e46fcc2ea" ErrorID="1050"/>
					</Setting>
					<Object Type="Port" Name="ADAM SSL Port" Key1="%PREREQSERVER%">
						<Setting Key1="%ADAMSSLPORT%">
							<Rule Name="fADAMSSLPortAlreadyInUse" Query="not(contains($.[2],'Not Available'))" Error="Error" Text="Active Directory Application Mode (ADAM) service instance installation cannot proceed. SSL port {7} is already in use." S7="%ADAMSSLPORT%" GUID="00dbc109-989b-4894-a36d-017e46fcc2ea" ErrorID="1051"/>
						</Setting>
					</Object>
				</Object>

				<!-- Test the target folder to see if it's compressed -->
				<Object Type="If" Name="Edge Target Path" Key1="true()" Task="PrecheckInstall,PrecheckUpgrade" Role="Gateway">
					<Setting Key1="string('%TARGETDIR%')" Key2="1" Substitution="TARGETPATH" Format="^(.:\\.*?)\\.*$----$1" SubstitutionFormat="\\----\\"/>
					<Setting Key1="string('%TARGETDIR%')" Key2="2" Substitution="TARGETDISPLAY" SubstitutionFormat="^(.:\\.*?)\\.*$----$1"/>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_Directory" Key4="name='%TARGETPATH%'">
						<Setting Key1="Compressed">
							<Rule Name="fTargetPathCompressed" Query="$.='True'" Error="Error" Text="The target path is compressed. Disable compression for '{5}' and attempt the installation process again." S5="%TARGETDISPLAY%" GUID="ed7d0f7f-2629-4952-9f2e-49f5f68f9048" ErrorID="1052"/>
						</Setting>
					</Object>
				</Object>

				<!-- Test for an existing ADAM directory. It's not possible to clean install into an existing directory -->
				<Object Type="Registry" Key1="%PREREQSERVER%" Key3="Software\Microsoft\Exchange\v8.0\EdgeTransportRole\AdamSettings\MsExchange" Role="Gateway" Task="PrecheckInstall">
					<Setting Key1="DataFilesPath" Substitution="ADAMDATAPATH" SubstitutionFormat="\\----\\">
						<Rule Name="fADAMDataPathExists" Query="count($szADAMDataPath)&gt;0" Error="Error" Text="An existing installation of Active Directory Application Mode (ADAM) was found in '{5}'. This folder must be removed before Setup can continue." P5="$szADAMDataPath" GUID="bfaf6dbd-6e45-4d66-854f-9d242f140e0a" ErrorID="6016"/>
					</Setting>
					<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_Directory" Key4="name='%ADAMDATAPATH%'">
						<Setting Key1="Name">
							<Rule Name="szADAMDataPath" Query="$."/>
						</Setting>
					</Object>
				</Object>

				<!-- Test the target folder to see if old database files exist in the first and/or second storage groups -->
				<Object Type="Group" Name="Mailbox Target Path" Task="PrecheckInstall" Role="Mailbox,ClusterMailbox">
					<Setting Key1="Existing file check">
						<Rule Name="fFirstSGFilesExist" Query="count($szFirstSGFiles) &gt;0" Error="Error" Text="Database files are present in '{5}'. These must be removed before Setup can continue." S5="%TARGETDIR%\Mailbox\First Storage Group" GUID="3c7fec71-7cd2-4bcd-b4be-814b8d19bcb4" ErrorID="1053"/>
						<Rule Name="fClusterFirstSGFilesExist" Query="count($szClusterFirstSGFiles) &gt;0" Error="Error" Text="Database files are present in '{5}'. These must be removed before Setup can continue." S5="%CMSDATAPATH%\First Storage Group" Role="ClusterMailbox" GUID="3c7fec71-7cd2-4bcd-b4be-814b8d19bcb4" ErrorID="1061"/>
						<Rule Name="fSecondSGFilesExist" Query="count($szSecondSGFiles) &gt;0" Error="Error" Text="Database files are present in '{5}'. These must be removed before Setup can continue." S5="%TARGETDIR%\Mailbox\Second Storage Group" GUID="3c7fec71-7cd2-4bcd-b4be-814b8d19bcb4" ErrorID="1054"/>
						<Rule Name="fClusterSecondSGFilesExist" Query="count($szClusterSecondSGFiles) &gt;0" Error="Error" Text="Database files are present in '{5}'. These must be removed before Setup can continue." S5="%CMSDATAPATH%\Second Storage Group" Role="ClusterMailbox" GUID="3c7fec71-7cd2-4bcd-b4be-814b8d19bcb4" ErrorID="1062"/>
					</Setting>
					<Object Type="File" Key1="%PREREQSERVER%" Key2="%TARGETDIR%\Mailbox\First Storage Group" Key3="*.*" Key5="All">
						<Setting Key1="FullName" Key2="*.*">
							<Rule Name="szFirstSGFiles" Query="$."/>
						</Setting>
					</Object>
					<!-- Check the cluster case -->
					<Object Type="Group" Key2="%CMSDATAPATH%" Role="ClusterMailbox">
						<Setting Key1="IOCTL_VOLUME_IS_CLUSTERED">
							<Rule Name="fCMSDataPathNotClustered" Query="false() and $.!=0 and '%CMSSHAREDSTORAGE%'='True'"/>
						</Setting>
					</Object>
					<Object Type="File" Key1="%PREREQSERVER%" Key2="%CMSDATAPATH%\First Storage Group" Key3="*.*" Key5="All" Role="ClusterMailbox">
						<Setting Key1="FullName" Key2="*.*">
							<Rule Name="szClusterFirstSGFiles" Query="$."/>
						</Setting>
					</Object>
					<!-- Only test the Second Storage Group if the Mailbox role is being installed with a Public Folder database -->
					<Object Type="If" Key1="'%CREATEPUBLICDB%'='true'">
						<Object Type="File" Key1="%PREREQSERVER%" Key2="%TARGETDIR%\Mailbox\Second Storage Group" Key3="*.*" Key5="All">
							<Setting Key1="FullName" Key2="*.*">
								<Rule Name="szSecondSGFiles" Query="$."/>
							</Setting>
						</Object>
					</Object>
					<Object Type="If" Key1="'%CREATEPUBLICDB%'='true'">
						<Object Type="File" Key1="%PREREQSERVER%" Key2="%CMSDATAPATH%\Second Storage Group" Key3="*.*" Key5="All" Role="ClusterMailbox">
							<Setting Key1="FullName" Key2="*.*">
								<Rule Name="szClusterSecondSGFiles" Query="$."/>
							</Setting>
						</Object>
					</Object>
				</Object>

				<!-- Find out if it's okay to uninstall Unified Messaging -->
				<Object Type="MonadCommand" Key1="Remove-UMPublishingPoint -whatif" Role="UnifiedMessaging" Task="PrecheckUninstall">
					<Rule Name="szRemoveUMPublishingPointException" Query="../Exception/@Message"/>
				</Object>

				<!-- // Verify that all non-core Exchange-related processes are closed before allowing upgrade to proceed -->
				<!-- // We don't need to check ClientAccess and UnifiedMessaging roles because they cannot be in-place upgraded -->
				<!-- // We also don't check ClusterMailbox because that shouldn't have file implications, and %TARGETDIR% won't be populated anyway -->
				<!-- // Use Monad to retrieve the list of processes that have Exchange files open -->
				<!-- // We ignore all core Exchange processes, IIS, cluster service and MOM because Setup will close these automatically -->
				<Object Type="MonadCommand" Key1="get-process | where { $_.ProcessName -notmatch '^(wmiprvse|clussvc|resrcmon|MOM|w3wp|msftesql|msftefd|EdgeTransport|EdgeCredentialSvc|mad|store|SpeechService|umservice|UMWorkerProcess|SESWorker|ExBPA|Microsoft\.Exchange\..*|MSExchange.*)$' } | where { $_.Modules | where {$_.FileName -like '%TARGETDIR%*' } }" Role="Mailbox,Gateway,Bridgehead,AdminTools" Task="PrecheckUpgrade">
					<Setting Key1="ProcessName">
						<Rule Name="fProcessNeedsToBeClosed" Query="$." Error="Error" Text="Setup cannot continue with the upgrade because the '{1}' ({7}) process (ID: {9}) has open files. Close the process and restart Setup." P1="$." P7="$szOpenProcessTitle" P9="$szOpenProcessId"/>
					</Setting>
					<Setting Key1="Id">
						<Rule Name="szOpenProcessId" Query="$."/>
					</Setting>
					<Setting Key1="MainWindowTitle">
						<Rule Name="szOpenProcessTitle" Query="$."/>
					</Setting>
					<!-- // Collect module information because it lists out each binary in use by this process. This is useful for debugging -->
					<Setting Key1="Modules"/>
				</Object>

				<!-- // Check the domain controller that Setup is using (or has been told to use) -->
				<!-- // Determine the Active Directory site name for the domain controller -->
				<!-- // If Setup uses an out-of-site domain controller, then it will run into replication issues midway through install -->
				<!-- // For this reason, we need to insist that the domain controller is in the same site as this computer -->
				<Object Type="DsGet" Key1="SiteName" Key2="%DOMAINCONTROLLER%" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR">
					<Setting Key1="SiteName">
						<Rule Name="fDomainControllerIsOutOfSite" Query="lower-case($szSiteName)!=lower-case($.) and ($szSiteName!='') and ($.!='')" Error="Error" Text="Setup cannot use domain controller '{2}' because it belongs to Active Directory site '{1}'. Setup must use a domain controller in the same site as this computer ({0})." P0="$szSiteName" P1="$." S2="%DOMAINCONTROLLER%"/>
					</Setting>

					<!-- // We need to make sure that the chosen domain controller is not running Windows 2000 as this will cause Setup failures -->
					<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Name="cn">
						<Setting Key1="configurationNamingContext" Substitution="CONFIGDN"/>
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Sites,%CONFIGDN%" Key3="(&amp;(objectClass=server)(|(cn=%DOMAINCONTROLLER%)(dNSHostName=%DOMAINCONTROLLER%)))" Key4="Subtree">
							<Setting Key1="serverReference" Substitution="DOMAINCONTROLLERREF"/>
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%DOMAINCONTROLLERREF%">
								<Setting Key1="operatingSystemVersion">
									<Rule Name="fDomainControllerIsWin2000" Query="starts-with($., '5.0')" Error="Error" Text="Setup cannot use domain controller '{2}' because it is running Windows 2000 Server. Use the /DomainController command-line switch to specify a domain controller that is running Windows Server 2003 or later." S2="%DOMAINCONTROLLER%"/>
								</Setting>
							</Object>
						</Object>
					</Object>
				</Object>

				<!-- Find out more about the Active Directory domain where this computer resides -->
				<Object Type="Group" Name="Local Domain Check" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox">
					<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Name="cn">
						<Setting Key1="configurationNamingContext" Substitution="CONFIGDN">
							<Rule Name="szConfigurationNamingContext" Query="$."/>
						</Setting>
						<Setting Key1="rootDomainNamingContext" Substitution="ROOTDN">
							<Rule Name="szRootDomainDN" Query="$."/>
						</Setting>
						<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_ComputerSystem">
							<Setting Key1="Domain" Substitution="COMPUTERDOMAIN"/>

							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Partitions,%CONFIGDN%" Key3="(&amp;(dnsRoot=%COMPUTERDOMAIN%)(systemFlags=3))" Key4="OneLevel">
								<!-- Check to make sure that the user can write to the domain container -->
								<Setting Key1="nCName" Substitution="LOCALNCNAME">
									<Rule Name="szComputerDomainDN" Query="$."/>
								</Setting>

								<Object Type="Directory" Key1="LDAP://%DOMAINCONTROLLER%" Key2="%LOCALNCNAME%">
									<Setting Key1="nTMixedDomain">
										<!-- The presence of the GUID signifies that setup wants to prepare the local domain -->
										<Rule Name="fLocalDomainModeMixed" Query="('%PREPAREDOMAIN%'='F63C3A12-7852-4654-B208-125C32EB409A') and $.=1" Error="Error" Text="Active Directory domain '{3}' is in mixed mode. To install Exchange Server 2007, the domain functional level must be raised to Windows 2000 native mode or above." S3="%LOCALNCNAME%" Role="Global" GUID="b88d3253-db66-4bc2-9423-65aff6b9f0a9" ErrorID="1012"/>
										<Rule Name="fDomainPrepRequired" Query="not($fLocalDomainIsPrepped) and $szComputerDomainDN != $szRootDomainDN" Error="Error" Text="The local domain needs to be prepared (via 'Setup /PrepareDomain') before server roles can be installed." Role="Mailbox,ClientAccess,Bridgehead,UnifiedMessaging" AlwaysEvaluate="True"/>
									</Setting>
									<Setting Key1="objectSid" Format="Sid" Substitution="SIDLOCALDOMAIN"/>
									<Object Type="Directory" Key1="LDAP://%DOMAINCONTROLLER%" Key2="%LOCALNCNAME%" Key3="(objectCategory=msExchSystemObjectsContainer)" Key4="Subtree">
										<Setting Key1="objectVersion">
											<Rule Name="fLocalDomainIsPrepped" Query="$. &gt;=10605"/>
										</Setting>
									</Object>
									<!-- Check to see if the logged-on user is a member of the Domain Admins group. -->
									<Object Type="CheckTokenMembership" Key1="%SIDLOCALDOMAIN%-512" Name="DomainAdmins">
										<Rule Name="fLocalDomainAdmin" Query="count(../Instance[@Name='DomainAdmins']) &gt;0"/>
									</Object>
								</Object>

							</Object>
						</Object>

						<!-- Check if the provisioned name is duplicated -->
						<Object Type="If" Key1="'%NEWPROVISIONEDSERVERNAME%'!=''">
							<Object Type="Directory" Key1="GC://%GLOBALCATALOG%" Key2="%ROOTDN%" Key3="(&amp;(objectClass=computer)(name=%NEWPROVISIONEDSERVERNAME%))" Key4="Subtree">
								<Rule Name="fDuplicateShortProvisionedName" Query="count(../Instance) &gt; 1" Error="Error" Text="Multiple computer objects with name {0} exist in the current Active Directory forest. The provisioned Exchange server must have a unique short name." S0="%NEWPROVISIONEDSERVERNAME%"/>
							</Object>
						</Object>
					</Object>
				</Object>


				<!-- Verify that the operating system supports Exchange -->
				<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_OperatingSystem" Role="Global,Mailbox,Bridgehead,ClientAccess,Gateway,UnifiedMessaging,AdminTools,ClusterMailbox">
					<Setting Key1="OSProductSuite">
						<Rule Name="iOSProductSuite" Query="$."/>
					</Setting>
				</Object>

				<!--Check to make sure that the computer belongs to the Windows domain-->
				<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_ComputerSystem" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox">
					<Setting Key1="DomainRole" Substitution="DOMAINROLE">
						<Rule Name="fComputerNotPartofDomain" Query="$.=0 or $.=2" Error="Error" Text="This computer is not part of a Windows domain." Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" ErrorID="1024"/>
					</Setting>
					<Setting Key1="Name" Substitution="LOCALSERVERNAME">
						<Rule Name="szServerName" Query="$."/>
						<!--Verifies that the local server name only contains 'A'-'Z', 'a'-'z', '0'-'9' and '-'-->
						<Rule Name="fServerNameNotValid" Query="not(matches($., '^[A-Za-z0-9\-]*$'))" Error="Error" Text="The server name is invalid. It contains characters other than 'A'-'Z', 'a'-'z', '0'-'9' and '-'." Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" ErrorID="1028"/>
					</Setting>
					<!-- If the local computer is a domain controller, connect to the rootDSE and find out if it is also a global catalog server -->
					<Object Type="If" Key1="'%DOMAINROLE%'='4' or '%DOMAINROLE%'='5'">
						<Object Type="Directory" Key1="LDAP://%LOCALSERVERNAME%/">
							<Setting Key1="isGlobalCatalogReady">
								<Rule Name="fLocalComputerIsDCInChildDomain" Query="lower-case($.)='false' and $szComputerDomainDN != $szRootDomainDN" Error="Error" Text="It is not supported to install Exchange 2007 on domain controllers in non-root domains. Promote this computer to be a global catalog server or run the installation program on a member server in the domain." Task="PrecheckInstall,PrecheckDR" Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging" GUID="b16f7767-3561-4d98-a95b-d7c8dd266af8"/>
							</Setting>
						</Object>
					</Object>
					<!--Verifies that user is logged on to an NT domain, not the local machine-->
					<Object Type="GetUserNameEx" Name="Interactive User">
						<Setting Key1="NameSamCompatible">
							<Rule Name="fLoggedOntoDomain" Query="starts-with(upper-case($.),concat(upper-case($szServerName), '\'))" Error="Error" Text="The user is not logged on to a Windows domain" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" ErrorID="1025"/>
						</Setting>
					</Object>
				</Object>

				<Object Type="Group" Name="Active Directory Checks" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox">
					<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Name="cn">
						<Setting Key1="configurationNamingContext" Substitution="CONFIGDN"/>
						<Setting Key1="rootDomainNamingContext" Substitution="ROOTDN"/>
						<Setting Key1="schemaNamingContext" Substitution="SCHEMADN"/>

						<!-- Locate the Exchange Servers group. -->
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Microsoft Exchange,cn=Services,%CONFIGDN%">
							<Setting Key1="otherWellKnownObjects" Substitution="EXSVRDN" SubstitutionFormat="(^B:32:A7D2016C83F003458132789EEB127B84:(?'dn'.*))?.*$----${dn}"/>
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%EXSVRDN%">
								<Setting Key1="sAMAccountName">
									<Rule Name="szExchangeServersGroup" Query="$."/>
								</Setting>
								<Setting Key1="nTSecurityDescriptor" Substitution="NTSD" Format="SecurityDescriptor"/>

								<!-- // Find out if the logged-on account has permissions on the Exchange Servers Universal Security Group object -->
								<!-- // See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/ads_rights_enum.asp for a full list of values -->
								<Object Type="AccessCheck" Key1="%NTSD%" Key2="MAXIMUM_ALLOWED">
									<Setting Key1="grantedAccess">
										<Rule Name="fHasExchangeServersUSGWritePerms" Query="bitwise-and($., hex('0xF00FF')) = hex('0xF00FF')"/>
										<Rule Name="fHasExchangeServersUSGBasicAccess" Query="bitwise-and($., hex('0xF01BD')) = hex('0xF01BD')"/>
									</Setting>
								</Object>
							</Object>

							<!-- Locate the Microsoft Exchange Security Groups organizational unit -->
							<Object Type="If" Key1="true()" Name="Microsoft Exchange Security Groups">
								<Setting Key1="string('%EXSVRDN%')" Substitution="MESGOU" SubstitutionFormat="^CN=Exchange Servers,(?'mesg'.*)$----${mesg}"/>
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%MESGOU%">
									<Setting Key1="allowedChildClassesEffective">
										<Rule Name="szAllowedWriteMESGClasses" Query="$."/>
									</Setting>
								</Object>
							</Object>
						</Object>

						<!-- Check to make sure that the schema is up to date -->
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=ms-Exch-Schema-Version-Pt,%SCHEMADN%">
							<Setting Key1="rangeUpper">
								<Rule Name="iSchemaVersionRangeUpper" Query="$."/>
							</Setting>
						</Object>

						<!-- Check the version of windows running on schema FSMO -->
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%SCHEMADN%">
							<Setting Key1="fSMORoleOwner" Substitution="FSMOROLESCHEMA" SubstitutionFormat="CN=NTDS Settings,CN=(.*?),.*----$1"/>
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Sites,%CONFIGDN%" Key3="(&amp;(objectClass=server)(cn=%FSMOROLESCHEMA%))">
								<Setting Key1="dNSHostName" Substitution="FSMOROLESCHEMA"/>
								<Setting Key1="serverReference" Substitution="FSMOROLESCHEMAREF">
									<Rule Name="szFSMOSchemaDomain" Query="concat('DC=',substring-after($.,'DC='))"/>
								</Setting>
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%FSMOROLESCHEMAREF%">
									<Setting Key1="operatingSystemVersion">
										<Rule Name="fWin2000FSMOSchemaServer" Query="starts-with($., '5.0')" Error="Error" Text="Schema master '{2}' is running Windows 2000 Server. The schema master must be upgraded to Windows Server 2003 Service Pack 1 or later." S2="%FSMOROLESCHEMA%" AlwaysEvaluate="True" Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,ClusterMailbox" GUID="8067537b-4a5b-4abd-8736-09635f785bc7" ErrorID="1031"/>
										<Rule Name="fWin2003FSMOSchemaServer" Query="starts-with($., '5.2')"/>
									</Setting>
									<Setting Key1="operatingSystemServicePack">
										<Rule Name="fFSMOSchemaServicePack" Query="starts-with($., 'Service Pack')"/>
									</Setting>
								</Object>
								<!-- Determine the Active Directory site name for the Schema Master -->
								<Object Type="DsGet" Key1="SiteName" Key2="%FSMOROLESCHEMA%">
									<Setting Key1="SiteName">
										<Rule Name="szFSMOSchemaSiteName" Query="$."/>
									</Setting>
								</Object>
							</Object>
						</Object>

						<!-- Find out if we can determine the local Active Directory site name -->
						<Object Type="DsGet" Key1="SiteName" Key2="">
							<Setting Key1="SiteName" Substitution="SITENAME">
								<Rule Name="szSiteName" Query="$."/>
								<Rule Name="fInvalidADSite" Query="$.=''" Error="Error" Text="This computer does not belong to a valid Active Directory site. Check the site and subnet definitions." Role="Global,Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,AdminTools,ClusterMailbox" GUID="cb4b0ae5-1167-40e5-895d-31c01c71dc60" ErrorID="1005"/>
								<Rule Name="fNoGCInSite" Query="count($fWin2003SPxGCInLocalSite)= 0" Error="Error" Text="Cannot find at least one global catalog server running Windows Server 2003 Service Pack 1 or later in the local Active Directory site." AlwaysEvaluate="True" Role="Mailbox,Bridgehead,ClientAccess,UnifiedMessaging,ClusterMailbox" GUID="67aca4a0-bc3f-4f8f-8297-b13e0d347942" ErrorID="1034"/>
							</Setting>

							<!-- Find out if there are any Active Directory Connectors in existence -->
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Sites,%CONFIGDN%" Key3="(objectClass=msExchActiveDirectoryConnector)" Key4="Subtree">
								<Setting Key1="cn">
									<Rule Name="szADCServer" Query="$."/>
								</Setting>
							</Object>

							<!-- Enumerate all domain controllers in the same Active Directory site as the local computer where Setup is running -->
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=%SITENAME%,cn=Sites,%CONFIGDN%" Key3="(&amp;(objectClass=server)(dNSHostName=*))" Key4="Subtree">
								<Setting Key1="distinguishedName" Substitution="ADSERVERDN"/>
								<Setting Key1="dNSHostName">
									<Rule Name="fWin2003SPxGCInLocalSite" Query="$fADServerIsGC and $fADWin2003Server and $fADServicePack"/>
								</Setting>
								<Setting Key1="serverReference" Substitution="SERVERREF"/>

								<!-- Find out if this domain controller is a global catalog -->
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%ADSERVERDN%" Key3="(objectClass=nTDSDSA)" Key4="OneLevel">
									<Setting Key1="options">
										<Rule Name="fADServerIsGC" Query="bitwise-and($.,1)=1"/>
									</Setting>
								</Object>

								<!-- Retrieve the computer object from the domain naming context and find out if it is Windows 2003 SP1 or later -->
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%SERVERREF%">
									<Setting Key1="operatingSystemVersion">
										<Rule Name="fADWin2003Server" Query="starts-with($., '5.2')"/>
									</Setting>
									<Setting Key1="operatingSystemServicePack">
										<Rule Name="fADServicePack" Query="starts-with($., 'Service Pack')"/>
									</Setting>
								</Object>

							</Object>
						</Object>

						<!-- Get the short server name and DNS domain name -->
						<Object Type="WMI" Key1="%PREREQSERVER%" Key3="Win32_ComputerSystem">
							<Setting Key1="Name" Substitution="SHORTSERVERNAME"/>
							<Setting Key1="Domain" Substitution="COMPUTERDNSDOMAIN"/>
							<!-- If this is a cluster, replace the SHORTSERVERNAME with the CMSNAME -->
							<Object Type="If" Key1="true()">
								<Setting Key1="if('%CMSNAME%'='', '%SHORTSERVERNAME%', '%CMSNAME%')" Substitution="SHORTSERVERNAME"/>

								<!-- Check whether the Exchange Organization is native or mixed mode -->
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Microsoft Exchange,cn=Services,%CONFIGDN%">
									<Setting Key1="distinguishedName" Substitution="DN"/>
									<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%DN%" Key3="objectClass=msExchOrganizationContainer" Key4="OneLevel">
										<Setting Key1="distinguishedName" Substitution="DN"/>
										<Setting Key1="msExchMixedMode">
											<Rule Name="szExchangeMixedMode" Query="$."/>
										</Setting>

										<!-- // We now check 'msExchVersion' on the org object. This doesn't exist by default in Exchange 2007 but the implied value is essentially 0.0:6.5.6500.0 -->
										<!-- // The fExchangeVersionBlock rule allows us to block installs of Exchange 2007 should we have a native mode in a future version of Exchange -->
										<Setting Key1="msExchVersion" Format="ExchangeVersion">
											<Rule Name="fExchangeVersionBlock" Query="number(substring-before($.,':')) &gt;=1.0" Error="Error" Text="The Exchange organization does not support this version of Exchange Server."/>
										</Setting>

										<!-- Use Monad to retrieve the version of the existing Exchange Server object -->
										<Object Type="MonadCommand" Key1="Get-ExchangeServer -Identity %SHORTSERVERNAME%" Task="PrecheckUpgrade,PrecheckDR,PrecheckUninstall">
											<Setting Key1="AdminDisplayVersion">
												<Rule Name="fDRMinVersionCheck" Query="version-compare(replace($., '^Version (\d+\.\d+) \(Build (\d+\.\d+)\)$', '$1.$2'), '%EXCHANGEVERSION%') &gt;0" Error="Error" Text="Exchange Server 2007 build {9} or later must be used to perform a recovery of this server." P9="replace($., '^Version (\d+\.\d+) \(Build (\d+\.\d+)\)$', '$1.$2')" Task="PrecheckDR" ErrorID="6020"/>
											</Setting>
										</Object>

										<!-- Get any existing information about the server that we're trying to install -->
										<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(cn=%SHORTSERVERNAME%))" Key4="Subtree">
											<Setting Key1="distinguishedName" Substitution="DN"/>
											<Setting Key1="cn">
												<Rule Name="fServerAlreadyExists" Query="$."/>
											</Setting>
											<Setting Key1="msExchCurrentServerRoles">
												<Rule Name="fMailboxRoleInstalled" Query="boolean(bitwise-and($.,2))"/>
												<Rule Name="fClientAccessRoleInstalled" Query="boolean(bitwise-and($.,4))"/>
												<Rule Name="fPublicFolderRoleInstalled" Query="boolean(bitwise-and($.,8))"/>
												<Rule Name="fUnifiedMessagingRoleInstalled" Query="boolean(bitwise-and($.,16))"/>
												<Rule Name="fBridgeheadRoleInstalled" Query="boolean(bitwise-and($.,32))"/>
												<Rule Name="fGatewayRoleInstalled" Query="boolean(bitwise-and($.,64))"/>
												<Rule Name="fServerIsProvisioned" Query="boolean(bitwise-and($.,4096))"/>
											</Setting>
											<Setting Key1="legacyExchangeDN" Substitution="PREREQSERVERLEGDN"/>
											<Setting Key1="distinguishedName" Substitution="PREREQSERVERDN"/>
											<Setting Key1="nTSecurityDescriptor" Substitution="NTSD" Format="SecurityDescriptor"/>
											<Setting Key1="msExchClusterStorageType">
												<Rule Name="fClusterStorageTypeNotCCR" Query="$.!=1"/>
											</Setting>

											<!-- Find out if the logged-on account has permissions on the Exchange server object -->
											<Object Type="If" Key1="true()">
												<Setting Key1="'0;a8df74a7-c5ea-11d1-bbcb-0080c76670c0'" Key2="mTA" Substitution="G01"/>
												<Setting Key1="'0;a8df74b2-c5ea-11d1-bbcb-0080c76670c0'" Key2="exchangeAdminService" Substitution="G02"/>
												<Setting Key1="'0;bf967a8b-0de6-11d0-a285-00aa003049e2'" Key2="container" Substitution="G03"/>
												<Setting Key1="'0;28630ec1-41d5-11d1-a9c1-0000f80367c1'" Key2="serviceConnectionPoint" Substitution="G04"/>
												<Setting Key1="'0;031b371a-a981-11d2-a9ff-00c04f8eedd8'" Key2="msExchInformationStore" Substitution="G05"/>
												<Setting Key1="'0;3435244a-a982-11d2-a9ff-00c04f8eedd8'" Key2="msExchStorageGroup" Substitution="G06"/>
												<Setting Key1="'0;36145cf4-a982-11d2-a9ff-00c04f8eedd8'" Key2="msExchPrivateMDB" Substitution="G07"/>
												<Setting Key1="'0;966540a1-75f7-4d27-ace9-3858b5dea688'" Key2="msExchAutoDiscoverVirtualDirectory" Substitution="G08"/>
												<Setting Key1="'0;9432cae6-b09e-11d2-aa06-00c04f8eedd8'" Key2="msExchProtocolCfgHTTPContainer" Substitution="G09"/>
												<Setting Key1="'0;93da93e4-b09e-11d2-aa06-00c04f8eedd8'" Key2="msExchProtocolCfgIMAPContainer" Substitution="G10"/>
												<Setting Key1="'0;a8df74d1-c5ea-11d1-bbcb-0080c76670c0'" Key2="protocolCfgSharedServer" Substitution="G11"/>
												<Setting Key1="'0;a8df74c5-c5ea-11d1-bbcb-0080c76670c0'" Key2="protocolCfgIMAPServer" Substitution="G12"/>
												<Setting Key1="'0;a8df74ce-c5ea-11d1-bbcb-0080c76670c0'" Key2="protocolCfgPOPServer" Substitution="G13"/>
												<Setting Key1="'0;3378ca84-a982-11d2-a9ff-00c04f8eedd8'" Key2="protocolCfgSMTPServer" Substitution="G14"/>
												<Setting Key1="'0;33bb8c5c-a982-11d2-a9ff-00c04f8eedd8'" Key2="protocolCfgSMTPDomainContainer" Substitution="G15"/>
												<Setting Key1="'0;3397c916-a982-11d2-a9ff-00c04f8eedd8'" Key2="protocolCfgSMTPRoutingSources" Substitution="G16"/>
												<Setting Key1="'0;8ef628c6-b093-11d2-aa06-00c04f8eedd8'" Key2="protocolCfgSMTPSessions" Substitution="G17"/>
												<Setting Key1="'0;93f99276-b09e-11d2-aa06-00c04f8eedd8'" Key2="msExchProtocolCfgPOPContainer" Substitution="G18"/>
												<Setting Key1="'0;93bb9552-b09e-11d2-aa06-00c04f8eedd8'" Key2="msExchProtocolCfgSMTPContainer" Substitution="G19"/>
												<Setting Key1="'0;44601346-776a-46e7-b4a4-2472e1c66806'" Key2="msExchSmtpReceiveConnector" Substitution="G20"/>
												<Setting Key1="'0;20309cbd-0ae3-4876-9114-5738c65f845c'" Key2="msExchSmtpSendConnectorFQDN" Substitution="G21"/>
												<Object Type="Cache" Name="GUIDS" Key1="AddValue" Key2="GUIDS" Key3="%G01%|%G02%|%G03%|%G04%|%G05%|%G06%|%G07%|%G08%|%G09%|%G10%|%G11%|%G12%|%G13%|%G14%|%G15%|%G16%|%G17%|%G18%|%G19%|%G20%|%G21%" Key4="\|"/>
												<Object Type="Cache" Name="GUIDS" Key1="Dump" Key2="GUIDS">
													<Setting Key1="OBJECT_TYPE_LIST" Substitution="OBJECT_TYPE_LIST"/>
													<Object Type="AccessCheck" Key1="%NTSD%" Key2="MAXIMUM_ALLOWED" Key4="%OBJECT_TYPE_LIST%">
														<Setting Key1="grantedAccess">
															<Rule Name="fHasServerDelegatedPermsBlocked" Query="bitwise-and($., hex('0xF00FF')) != hex('0xF00FF')"/>
														</Setting>
													</Object>
												</Object>
											</Object>

											<!-- Enumerate all storage groups on this server -->
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=InformationStore,%DN%" Key3="objectClass=msExchStorageGroup" Key4="OneLevel" Role="Mailbox,ClusterMailbox">
												<Setting Key1="distinguishedName" Substitution="DN"/>
												<Setting Key1="msExchESEParamLogFilePath" Substitution="LOGDRIVE" SubstitutionFormat="^(.:\\).*$----$1"/>
												<!-- Find out if the log drive(s) exist -->
												<Object Type="MonadCommand" Key1="test-path '%LOGDRIVE%'" Task="PrecheckDR">
													<Setting Key1="__THIS">
														<Rule Name="fLogDriveDoesNotExist" Query="$.='False'" Error="Error" Text="Disaster recovery setup needs access to log drive '{5}' to continue." S5="%LOGDRIVE%" Task="PrecheckDR" GUID="80689097-fe5e-4501-b1ec-2189297e7580" ErrorID="1044"/>
													</Setting>
												</Object>

												<!-- Enumerate all mailbox databases in this storage group -->
												<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%DN%" Key3="objectClass=msExchPrivateMDB" Key4="OneLevel">
													<Setting Key1="distinguishedName" Substitution="DN"/>
													<Setting Key1="cn" Substitution="DATABASENAME">
														<Rule Name="fUnwillingToRemoveMailboxDatabase" Query="count($szRemoveMailboxDatabaseException) &gt;0" Error="Error" Text="Uninstall cannot continue. Database '{3}': {1}" P1="$szRemoveMailboxDatabaseException" S3="%DATABASENAME%" Task="PrecheckUninstall" GUID="4a96fd69-9cec-4a48-9571-5c9e8ab3cfe9" ErrorID="1046"/>
													</Setting>
													<Setting Key1="msExchEDBFile" Substitution="EDBDRIVE" SubstitutionFormat="^(.:\\).*$----$1"/>
													<!-- Find out if the mailbox database EDB drive exists -->
													<Object Type="MonadCommand" Key1="test-path '%EDBDRIVE%'" Task="PrecheckDR">
														<Setting Key1="__THIS">
															<Rule Name="fMailboxEDBDriveDoesNotExist" Query="$.='False'" Error="Error" Text="Disaster recovery setup needs access to mailbox database drive '{5}' to continue." S5="%EDBDRIVE%" Task="PrecheckDR" GUID="6b5623fa-9a86-4b75-8af0-b3ca1045048c" ErrorID="1045"/>
														</Setting>
													</Object>
													<!-- Find out if it's okay to remove this database -->
													<Object Type="MonadCommand" Key1="Remove-MailboxDatabase '%DN%' -whatif" Task="PrecheckUninstall">
														<Rule Name="szRemoveMailboxDatabaseException" Query="../Exception/@Message"/>
													</Object>
												</Object>

												<!-- Enumerate all public folder databases in this storage group -->
												<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%DN%" Key3="objectClass=msExchPublicMDB" Key4="OneLevel">
													<Setting Key1="distinguishedName" Substitution="DN"/>
													<Setting Key1="cn" Substitution="DATABASENAME">
														<Rule Name="fUnwillingToRemovePublicFolderDatabase" Query="count($szRemovePublicFolderDatabaseException) &gt;0" Error="Error" Text="Uninstall cannot continue. Database '{3}': {1}" P1="$szRemovePublicFolderDatabaseException" S3="%DATABASENAME%" Task="PrecheckUninstall" GUID="b6e3b32a-8848-46cb-9567-72288ac15f60" ErrorID="1048"/>
													</Setting>
													<Setting Key1="legacyExchangeDn" Substitution="LEGDN"/>
													<Setting Key1="msExchEDBFile" Substitution="EDBDRIVE" SubstitutionFormat="^(.:\\).*$----$1"/>
													<!-- Find out if the public folder database EDB drive exists -->
													<Object Type="MonadCommand" Key1="test-path '%EDBDRIVE%'" Task="PrecheckDR">
														<Setting Key1="__THIS">
															<Rule Name="fPublicFolderEDBDriveDoesNotExist" Query="$.='False'" Error="Error" Text="Disaster recovery setup needs access to public folder database drive '{5}' to continue." S5="%EDBDRIVE%" Task="PrecheckDR" GUID="e197c6c1-2fb8-4ab3-ad0f-6e973529f29b" ErrorID="1047"/>
														</Setting>
													</Object>
													<!-- Find out if it's okay to remove this database -->
													<Object Type="MonadCommand" Key1="Remove-PublicFolderDatabase '%DN%' -whatif" Task="PrecheckUninstall">
														<Rule Name="szRemovePublicFolderDatabaseException" Query="../Exception/@Message"/>
													</Object>
												</Object>
											</Object>

											<!-- Check to see if this server is responsible for any OABs -->
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Offline Address Lists,cn=Address Lists Container,%DN%" Key3="(&amp;(objectClass=msExchOAB)(offlineABServer=%PREREQSERVERDN%))" Key4="Subtree" Role="Mailbox">
												<Setting Key1="distinguishedName">
													<Rule Name="szOABDN" Query="$."/>
												</Setting>
											</Object>

											<!-- // Verify that its safe to remove the Hub Transport role from this server. Objects will be orphaned if we don't block uninstall -->
											<!-- // The tests are performed using Monad rather than LDAP because current AD attributes are overloaded for E12 and are due to be deprecated at a future point in time -->
											<!-- // Monad abstracts us from the underlying attributes should they change -->
											<!-- // By design, the rules are not conditioned on the number of servers in the organization, so we will force administrators to tear down objects manually, even for last server uninstalls -->
											<Object Type="Group" Name="Transport Uninstall" Role="Bridgehead" Task="PrecheckUninstall">
												<Setting Key1="Rules">
													<Rule Name="fServerIsSourceForSendConnector" Query="count($szSendConnector) &gt;0" Error="Error" Text="This computer is configured as a source transport server for {9} connector(s) in the organization. These must be moved or deleted before Setup can continue." P9="count($szSendConnector)"/>
													<Rule Name="fServerIsBridgeheadForRGConnector" Query="count($szRGConnector) &gt;0" Error="Error" Text="This computer is configured as a bridgehead server for {9} routing group connector(s) in the organization. These must be moved or deleted before Setup can continue." P9="count($szRGConnector)"/>
													<Rule Name="fServerIsGroupExpansionServer" Query="count($szGroupDN) &gt;0" Error="Error" Text="This computer is responsible for expanding the membership of {9} distribution group(s). These must be reassigned to another server before Setup can continue." P9="count($szGroupDN)" GUID="9b815db1-19fa-482b-8218-ba8affef57eb"/>
													<Rule Name="fServerIsDynamicGroupExpansionServer" Query="count($szDynamicGroupDN) &gt;0" Error="Error" Text="This computer is responsible for expanding the membership of {9} dynamic distribution group(s). These must be reassigned to another server before Setup can continue." P9="count($szDynamicGroupDN)" GUID="9b815db1-19fa-482b-8218-ba8affef57eb"/>
												</Setting>

												<!-- // Check to see if this server is a source bridgehead for any Send Connectors -->
												<!-- // We use a RegEx here because we're testing a multi-valued property -->
												<Object Type="MonadCommand" Key1="Get-SendConnector | where {$_.SourceTransportServers -match '^%SHORTSERVERNAME%$'}">
													<Setting Key1="DistinguishedName">
														<Rule Name="szSendConnector" Query="$."/>
													</Setting>
												</Object>

												<!-- // Check to see if this server is a source or target bridgehead for any Routing Group Connectors -->
												<!-- // We use a RegEx here because we're testing a multi-valued property -->
												<Object Type="MonadCommand" Key1="Get-RoutingGroupConnector | where {$_.SourceTransportServers -match '^%SHORTSERVERNAME%$' -or $_.TargetTransportServers -match '^%SHORTSERVERNAME%$'}">
													<Setting Key1="DistinguishedName">
														<Rule Name="szRGConnector" Query="$."/>
													</Setting>
												</Object>

												<!-- // Check to see if this server is responsible for Distribution Group expansion -->
												<Object Type="MonadCommand" Key1="Get-DistributionGroup | where {$_.ExpansionServer -eq '%PREREQSERVERLEGDN%'}">
													<Setting Key1="DistinguishedName">
														<Rule Name="szGroupDN" Query="$."/>
													</Setting>
												</Object>

												<!-- // Check to see if this server is responsible for Dynamic Distribution Group expansion -->
												<Object Type="MonadCommand" Key1="Get-DynamicDistributionGroup | where {$_.ExpansionServer -eq '%PREREQSERVERLEGDN%'}">
													<Setting Key1="DistinguishedName">
														<Rule Name="szDynamicGroupDN" Query="$."/>
													</Setting>
												</Object>
											</Object>
										</Object>

										<!-- Enumerate the list of recipient policies -->
										<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Recipient Policies,%DN%" Key3="objectClass=msExchRecipientPolicy" Key4="OneLevel">
											<Setting Key1="cn" Substitution="RECIPPOLNAME"/>
											<Setting Key1="gatewayProxy" Format="^(SMTP:.*\@(?'smtpaddress'.*))?.*$----${smtpaddress}">
												<Rule Name="fServerFQDNMatchesSMTPPolicy" Query="lower-case($.)=lower-case($szComputerNameDnsFullyQualified)" Error="Error" Text="The fully qualified domain name (FQDN) of the local computer matches the SMTP address of recipient policy '{3}'. Setup cannot continue." S3="%RECIPPOLNAME%" Task="PrecheckInstall,PrecheckUpgrade,PrecheckDR" GUID="e21fee98-5929-4ef4-9e64-17c92c25222f" ErrorID="1043"/>
												<Rule Name="fSMTPAddressLiteral" Query="$.[matches(., '^\[\d+\.\d+\.\d+\.\d+\]$')]" Error="Error" Text="Recipient policy '{3}' uses an unsupported SMTP addressing format ({1}). The value must be changed before Setup can continue." P1="$.[matches(., '^\[\d+\.\d+\.\d+\.\d+\]$')]" S3="%RECIPPOLNAME%" Role="Global,Bridgehead" Task="PrecheckInstall"/>
											</Setting>
										</Object>

										<!-- Get a list of all Exchange servers and versions in the forest -->
										<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Administrative Groups,%DN%" Key3="objectClass=msExchExchangeServer" Key4="Subtree">
											<Setting Key1="cn"/>
											<Setting Key1="serialNumber">
												<Rule Name="fExchange12" Query="contains ($., 'Version 8.0')"/>
												<Rule Name="fExchange200x" Query="contains ($., 'Version 6')"/>
												<Rule Name="fExchange2003" Query="contains ($., 'Version 6.5')"/>
												<Rule Name="fExchange2000" Query="contains ($., 'Version 6.0')"/>
											</Setting>
											<Setting Key1="versionNumber">
												<Rule Name="fExchange2003PreSP2" Query="$fExchange2003 and $. &lt;7638"/>
												<Rule Name="fExchange2000PreSP3" Query="$fExchange2000 and $. &lt;6249"/>
											</Setting>
										</Object>

										<!-- Determine which roles are already present in the topology -->
										<Object Type="Group" Name="Roles installed in the topology">
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,cn=Exchange Administrative Group (FYDIBOHF23SPDLT),cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=32))" Key4="OneLevel">
												<Setting Key1="cn">
													<Rule Name="szBridgeheadRoleInTopology" Query="$."/>
												</Setting>
											</Object>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,cn=Exchange Administrative Group (FYDIBOHF23SPDLT),cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=16))" Key4="OneLevel">
												<Setting Key1="cn">
													<Rule Name="szUnifiedMessagingRoleInTopology" Query="$."/>
												</Setting>
											</Object>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,cn=Exchange Administrative Group (FYDIBOHF23SPDLT),cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=4))" Key4="OneLevel">
												<Setting Key1="cn">
													<Rule Name="szClientAccessRoleInTopology" Query="$."/>
												</Setting>
											</Object>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,cn=Exchange Administrative Group (FYDIBOHF23SPDLT),cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=2))" Key4="OneLevel">
												<Setting Key1="cn">
													<Rule Name="szMailboxRoleInTopology" Query="$."/>
												</Setting>
											</Object>
										</Object>

										<!-- Determine whether Bridgehead and ClientAccess roles exist in this AD Site already -->
										<Object Type="DsGet" Key1="SiteName" Key2="" Task="PrecheckInstall" Role="Mailbox,ClusterMailbox">
											<Setting Key1="SiteName" Substitution="SITENAME"/>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,cn=Exchange Administrative Group (FYDIBOHF23SPDLT),cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(msExchServerSite=cn=%SITENAME%,cn=Sites,%CONFIGDN%)(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=32))" Key4="OneLevel">
												<Setting Key1="cn">
													<Rule Name="szBridgeheadRoleInCurrentADSite" Query="$."/>
												</Setting>
											</Object>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,cn=Exchange Administrative Group (FYDIBOHF23SPDLT),cn=Administrative Groups,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(msExchServerSite=cn=%SITENAME%,cn=Sites,%CONFIGDN%)(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=4))" Key4="OneLevel">
												<Setting Key1="cn">
													<Rule Name="szClientAccessRoleInCurrentADSite" Query="$."/>
												</Setting>
											</Object>
										</Object>

										<!-- Check to see if there are other E12 servers or E2K/E2K3 servers -->
										<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Administrative Groups,%DN%" Key3="(objectClass=msExchAdminGroup)" Key4="OneLevel">
											<Setting Key1="distinguishedName" Substitution="DN"/>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(|(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=2)(!(msExchCurrentServerRoles=*))))" Key4="OneLevel" Role="Mailbox">
												<Setting Key1="cn">
													<Rule Name="szOtherPotentialOABServers" Query="$."/>
												</Setting>
											</Object>
											<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Servers,%DN%" Key3="(&amp;(objectClass=msExchExchangeServer)(|(msExchCurrentServerRoles:1.2.840.113556.1.4.803:=32)(!(msExchCurrentServerRoles=*))))" Key4="OneLevel" Role="Bridgehead">
												<Setting Key1="cn">
													<Rule Name="szOtherPotentialExpansionServers" Query="$."/>
												</Setting>
											</Object>
										</Object>

									</Object>
								</Object>
							</Object>
						</Object>

						<!-- Perform checks on a domain specified with the PrepareDomain switch -->
						<Object Type="If" Key1="(('%PREPAREDOMAIN%'!='F63C3A12-7852-4654-B208-125C32EB409A') and ('%PREPAREDOMAIN%'!=''))" Role="Global">
							<Object Type="Group" Name="Prepare Domain">
								<Setting Key1="PrepareDomain Rules">
									<Rule Name="fPrepareDomainNotFound" Query="count($szPrepareDomain)=0" Error="Error" Text="Setup cannot find domain '{3}' in Active Directory. Preparation canceled." S3="%PREPAREDOMAIN%" AlwaysEvaluate="True" Role="Global"/>
									<Rule Name="fPrepareDomainNotAdmin" Query="count($szPrepareDomain) &gt;0 and not(($fPrepareDomainAdmin and $fHasExchangeServersUSGBasicAccess) or $fEnterpriseAdmin)" Error="Error" Text="You must be a member of the 'Domain Admins' group in domain '{3}' and 'Exchange Organization Administrators' group, or 'Enterprise Admins' group to proceed." S3="%PREPAREDOMAIN%" AlwaysEvaluate="True" Role="Global" ErrorID="5001"/>
								</Setting>
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Partitions,%CONFIGDN%" Key3="(&amp;(systemFlags=3)(|(cn=%PREPAREDOMAIN%)(dnsRoot=%PREPAREDOMAIN%)))" Key4="OneLevel">
									<Setting Key1="nCName" Substitution="NCNAME">
										<Rule Name="szPrepareDomain" Query="$."/>
									</Setting>
									<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%NCNAME%">
										<Setting Key1="objectSid" Format="Sid" Substitution="SIDPREPAREDOMAIN"/>
										<Setting Key1="nTMixedDomain">
											<Rule Name="fPrepareDomainModeMixed" Query="$.=1" Error="Error" Text="Active Directory domain '{3}' is in mixed mode. To install Exchange Server 2007, this domain must be Windows 2000 native mode or above." S3="%NCNAME%" Role="Global" GUID="b88d3253-db66-4bc2-9423-65aff6b9f0a9" ErrorID="1011"/>
										</Setting>
										<!-- Check to see if the logged-on user is a member of the Domain Admins group. -->
										<Object Type="CheckTokenMembership" Key1="%SIDPREPAREDOMAIN%-512" Name="PrepareDomainAdmins">
											<Rule Name="fPrepareDomainAdmin" Query="count(../Instance[@Name='PrepareDomainAdmins']) &gt;0"/>
										</Object>
									</Object>
								</Object>
							</Object>
						</Object>

						<!-- // Enumerate all domains in the forest. The 'systemFlags=3' condition filters out internal and DNS partitions -->
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Partitions,%CONFIGDN%" Key3="(systemFlags=3)" Key4="OneLevel">
							<Setting Key1="nCName" Substitution="NCNAME"/>

							<!-- // Enumerate domain information from the domainNC -->
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%NCNAME%">
								<Setting Key1="nTMixedDomain">
									<Rule Name="fDomainModeMixed" Query="('%PREPAREALLDOMAINS%'='true') and $.=1" Error="Error" Text="Active Directory domain '{3}' is in mixed mode. To install Exchange Server 2007, this domain must be Windows 2000 native mode or above." S3="%NCNAME%" Role="Global" GUID="b88d3253-db66-4bc2-9423-65aff6b9f0a9" ErrorID="1011"/>
								</Setting>

								<!-- // Find out if this domain is domainprep'd -->
								<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Microsoft Exchange System Objects,%NCNAME%" Role="Global,Mailbox,ClusterMailbox">
									<Setting Key1="cn">
										<Rule Name="fRUSMissing" Query="count($fExchange200x) &gt;0 and count($szRUSName)=0" Error="Warning" Text="Cannot find the Recipient Update Service responsible for domain '{3}'. New and existing users may not be properly Exchange-enabled." S3="%NCNAME%" AlwaysEvaluate="True" GUID="3bc93fba-92fb-4bf6-94c3-3fcf17171cb0" ErrorID="1042"/>
										<Rule Name="fNoValidDCForPrepareLegPerms" Query="('%PREPARELEGACYEXCHANGEPERMISSIONS%'='2A7F95FC-66C6-445F-AAB9-19744C05E70E') and $fEESGroupExists and $fEDSGroupExists and count($szDomainValidDC)=0" Error="Error" Text="Cannot find at least one domain controller running Windows Server 2003 Service Pack 1 or later in domain '{3}'." S3="%NCNAME%" Role="Global" AlwaysEvaluate="True"/>
									</Setting>

									<!-- // Find out if there is at least one Windows 2003 SP1 or later domain controller in the domain. This is necessary for /PrepareLegacyExchangePermissions to function -->
									<!-- // NOTE: It is possible to move DCs out of the (non-localized) 'Domain Controllers' OU which means that our search won't pick them up -->
									<!-- // NOTE: However, a domain-wide search with this LDAP filter is almost sure to time-out -->
									<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="ou=Domain Controllers,%NCNAME%" Key3="(&amp;(objectClass=computer)(serverReferenceBL=*)(|(&amp;(operatingSystemVersion=5.2*)(operatingSystemServicePack=*))(operatingSystemVersion=6.0)))">
										<Setting Key1="cn">
											<Rule Name="szDomainValidDC" Query="$."/>
										</Setting>
										<Setting Key1="operatingSystemVersion"/>
										<Setting Key1="operatingSystemServicePack"/>
									</Object>

									<!-- // Verify that the EES/EDS groups exist. Initialize-ExchangeLegacyPermissions skips domains where these groups don't exist -->
									<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Exchange Enterprise Servers,cn=Users,%NCNAME%">
										<Setting Key1="objectGuid">
											<Rule Name="fEESGroupExists" Query="count($.) &gt;0"/>
										</Setting>
									</Object>
									<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Exchange Domain Servers,cn=Users,%NCNAME%">
										<Setting Key1="objectGuid">
											<Rule Name="fEDSGroupExists" Query="count($.) &gt;0"/>
										</Setting>
									</Object>

									<!-- // Find out if there is a RUS configured for this domain -->
									<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Microsoft Exchange,cn=Services,%CONFIGDN%" Key3="(&amp;(objectClass=msExchAddressListService)(msExchDomainLink=%NCNAME%))" Key4="Subtree">
										<Setting Key1="cn">
											<Rule Name="szRUSName" Query="$."/>
										</Setting>
									</Object>
								</Object>
							</Object>
						</Object>

						<!-- Get SID of root domain -->
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%ROOTDN%">
							<Setting Key1="objectSid" Format="Sid" Substitution="SIDROOTDOMAIN"/>

							<!-- Verify that the root domain is in native mode -->
							<Setting Key1="nTMixedDomain">
								<Rule Name="fRootDomainModeMixed" Query="$.=1" Error="Error" Text="Active Directory root domain '{3}' is in mixed mode. To install Exchange Server 2007, this domain must be Windows 2000 native mode or above." S3="%ROOTDN%" Role="Global" GUID="b88d3253-db66-4bc2-9423-65aff6b9f0a9" ErrorID="1064"/>
							</Setting>

							<!-- Check to see if the logged-on user is a member of the Schema Admins group. -->
							<Object Type="CheckTokenMembership" Key1="%SIDROOTDOMAIN%-518" Name="SchemaAdmins">
								<Rule Name="fSchemaAdmin" Query="count(../Instance[@Name='SchemaAdmins']) &gt;0"/>
							</Object>

							<!-- Check to see if the logged-on user is a member of the Enterprise Admins group. -->
							<Object Type="CheckTokenMembership" Key1="%SIDROOTDOMAIN%-519" Name="EnterpriseAdmins">
								<Rule Name="fEnterpriseAdmin" Query="count(../Instance[@Name='EnterpriseAdmins']) &gt;0"/>
							</Object>
						</Object>

						<!-- Discover the distinguishedName of the Exchange Org Admins group. -->
						<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="cn=Microsoft Exchange,cn=Services,%CONFIGDN%">
							<Setting Key1="otherWellKnownObjects" Substitution="ORGDN" SubstitutionFormat="(^B:32:354B603D92D95541AAFD8C0AE688EA0F:(?'dn'.*))?.*$----${dn}"/>
							<Object Type="Directory" Key1="LDAP://%GLOBALCATALOG%" Key2="%ORGDN%">
								<Setting Key1="sAMAccountName">
									<Rule Name="szExOrgAdminAccountName" Query="$."/>
								</Setting>
								<Setting Key1="objectSid" Format="Sid" Substitution="SIDEXORGADMINS"/>

								<!-- Check to see if the logged-on user is a member of the Exchange Org Admins group. -->
								<Object Type="CheckTokenMembership" Key1="%SIDEXORGADMINS%" Name="ExchangeOrgAdmins">
									<Rule Name="fExOrgAdmin" Query="count(../Instance[@Name='ExchangeOrgAdmins']) &gt;0"/>
								</Object>
							</Object>
						</Object>

					</Object>
				</Object>
			</Object>
		</Object>

	</Type>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>QRBRMNlp/h3rP6fVZ8ii1KEaTAA=</DigestValue></Reference></SignedInfo><SignatureValue>
    kIF0PE/SSHP+3eWl+W6rRlpT/N6aXxmQfX8lsFYiWtKPLn0OOV0OQlATSLKs4iIXf5ll2Cz7
    FZhEZQo97zAEI3wggm4ujI+0dnApAMJJuniDw156xYZpxpx+Uz865d1LofUD8/zzqkt1JaNX
    ioPpj7zqrgPz30LX+oclh4RHxENcswawU91GM+ryBlh0GEkv/NXTh+S7bMU3xRNlCIDVQo6O
    JOHM0fWQybwNaP1ST4m5qiqZldomnaCzG0Y9buWrfrub5Aax2lG0lwLqOnEZGjYhI3nJ7M21
    eRbQ1yHahemE+nrnZuW0a/slbZqNVJSH1EgJmNVqUfCin/bP4n/6GQ==
  </SignatureValue><KeyInfo>
      <KeyValue>
        <RSAKeyValue>
          <Modulus>
            zYGWOK5covLB397Qq5WN1jydH4vDXYYuXfCxcvWrrIhqtdqxInsLyMilS5FeIhPp+fUjnbX0
            bnau7+6kPMfEwFlcP6uzczMmpmKBYXmhYvRuiJXQbt3Hn9KkURF2YbpwimWhlhaJp12B0ERm
            5dtWnkDK/Nx2JC5EMADl1n17lRHVWB2j6E8LyYjcotZTmWzKY8qZapqSXkxNEegv01tbXl9S
            o3MtpbuERQ2MGRV2ywjamqZwFehN7Gn9XbJrj+0pUTc4i8ZGSRWUUJiw9Gik194JcWd0nneM
            HYVrl+rnX0XM4OZxDdFjAJN7MZiOC7QTvbPQ7vHfIe6pYGHuN0M9ww==
          </Modulus>
          <Exponent>AQAB</Exponent>
        </RSAKeyValue>
      </KeyValue>
      <X509Data>
        <X509Certificate>
          MIIFMzCCBBugAwIBAgIKYUaeywAEAAAAZTANBgkqhkiG9w0BAQUFADCBpjELMAkGA1UEBhMC
          VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p
          Y3Jvc29mdCBDb3Jwb3JhdGlvbjErMCkGA1UECxMiQ29weXJpZ2h0IChjKSAyMDAwIE1pY3Jv
          c29mdCBDb3JwLjEjMCEGA1UEAxMaTWljcm9zb2Z0IENvZGUgU2lnbmluZyBQQ0EwHhcNMDYw
          NDA0MTk0MzQ2WhcNMDcxMDA0MTk1MzQ2WjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz
          aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0
          aW9uMR4wHAYDVQQDExVNaWNyb3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUA
          A4IBDwAwggEKAoIBAQDNgZY4rlyi8sHf3tCrlY3WPJ0fi8Ndhi5d8LFy9ausiGq12rEiewvI
          yKVLkV4iE+n59SOdtfRudq7v7qQ8x8TAWVw/q7NzMyamYoFheaFi9G6IldBu3cef0qRREXZh
          unCKZaGWFomnXYHQRGbl21aeQMr83HYkLkQwAOXWfXuVEdVYHaPoTwvJiNyi1lOZbMpjyplq
          mpJeTE0R6C/TW1teX1Kjcy2lu4RFDYwZFXbLCNqapnAV6E3saf1dsmuP7SlRNziLxkZJFZRQ
          mLD0aKTX3glxZ3Sed4wdhWuX6udfRczg5nEN0WMAk3sxmI4LtBO9s9Du8d8h7qlgYe43Qz3D
          AgMBAAGjggGSMIIBjjAOBgNVHQ8BAf8EBAMCBsAwHQYDVR0OBBYEFO7Za6l1U81P7htOGQYe
          o5yrz5T9MBMGA1UdJQQMMAoGCCsGAQUFBwMDMIGpBgNVHSMEgaEwgZ6AFCX4K0tdyHJUreX2
          oCoXFvvB+VOBoXSkcjBwMSswKQYDVQQLEyJDb3B5cmlnaHQgKGMpIDE5OTcgTWljcm9zb2Z0
          IENvcnAuMR4wHAYDVQQLExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xITAfBgNVBAMTGE1pY3Jv
          c29mdCBSb290IEF1dGhvcml0eYIQaguZT8AAHasR2sQCoWYnujBLBgNVHR8ERDBCMECgPqA8
          hjpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9Db2RlU2lnblBD
          QTIuY3JsME8GCCsGAQUFBwEBBEMwQTA/BggrBgEFBQcwAoYzaHR0cDovL3d3dy5taWNyb3Nv
          ZnQuY29tL3BraS9jZXJ0cy9Db2RlU2lnblBDQTIuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQA4
          2e+VOJtcmBRdVG5p3wLI57P708JNrS+rf1QN2jK2+GrmDfshGnc+pWh6tJV+ilzyQ8SDm2V9
          iFBRfIIU9YNz16K+XMoCcM4mbBe8UhSlicC35KHMoXWdkXE9G8BWAFa1+IQm2l4z+9Ylel6a
          2qb79PJBGqxVRq1I3JE4E1gJSfHzMYcfvASOWxJlA+kLUdChDIqZvdnBqNAIFSUhtbZXiRzR
          W4Y1pcr9qofsqTc/t0Nr4yDxRbx+runxVbKhSLxlvlM02cnoBmMEBnhuUP9Iu5vqQ1qH260K
          gPVZxSzk5X9bSuUyee4ihZIMLbNQW8bCQFhYq9LN4y/Bzextnzd5
        </X509Certificate>
      </X509Data>
      <X509Data>
        <X509Certificate>
          MIIEEjCCAvqgAwIBAgIPAMEAizw8iBHRPvZj7N9AMA0GCSqGSIb3DQEBBAUAMHAxKzApBgNV
          BAsTIkNvcHlyaWdodCAoYykgMTk5NyBNaWNyb3NvZnQgQ29ycC4xHjAcBgNVBAsTFU1pY3Jv
          c29mdCBDb3Jwb3JhdGlvbjEhMB8GA1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5MB4X
          DTk3MDExMDA3MDAwMFoXDTIwMTIzMTA3MDAwMFowcDErMCkGA1UECxMiQ29weXJpZ2h0IChj
          KSAxOTk3IE1pY3Jvc29mdCBDb3JwLjEeMBwGA1UECxMVTWljcm9zb2Z0IENvcnBvcmF0aW9u
          MSEwHwYDVQQDExhNaWNyb3NvZnQgUm9vdCBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUA
          A4IBDwAwggEKAoIBAQCpAr3BcOY78k4bKJ+XeF4w6qKpjSVf+P6VTKO3/p2iID58UaKboo9g
          MmvRQmR57qx2yVTa8uuchhyPn4Rms8VremIj1h083g8BkuiWxL8tZpqaaCaZ0Dosvwy1WCbB
          RucKPjiWLKkoOajsSYNC44QPu5psVWGsgnyhYC13TOmZtGQ7mlAcMQgkFJ+p55ErGOY9mGMU
          YFgFZZ8dN1KH96fvlALGG9O/VUWziYC/OuxUlE6u/ad6bXROrxjMlgkoIQBXkGBpN7tLEgc8
          Vv9b+6RmCgim0oFWV++2O14WgXcE2va+roCV/rDNf9anGnJcPMq88AijIjCzBoXJsyB3E4Xf
          AgMBAAGjgagwgaUwgaIGA1UdAQSBmjCBl4AQW9Bw72lyniNRfhSyTY7/y6FyMHAxKzApBgNV
          BAsTIkNvcHlyaWdodCAoYykgMTk5NyBNaWNyb3NvZnQgQ29ycC4xHjAcBgNVBAsTFU1pY3Jv
          c29mdCBDb3Jwb3JhdGlvbjEhMB8GA1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5gg8A
          wQCLPDyIEdE+9mPs30AwDQYJKoZIhvcNAQEEBQADggEBAJXoC8CN85cYNe24ASTYdxHzXGAy
          n54Lyz4FkYiPyTrmIfLwV5MstaBHyGLv/NfMOztaqTZUaf4kbT/JzKreBXzdMY09nxBwarv+
          Ek8YacD80EPjEVogT+pie6+qGcgrNyUtvmWhEoolD2Oj91Qc+SHJ1hXzUqxuQzIH/YIX+OVn
          bA1R9r3xUse958Qw/CAxCYgdlSkaTdUdAqXxgOADtFv0sd3IV+5lScdSVLa0AygS/5DW8AiP
          friXxas3LOR65Kh343agANBqP8HSNorgQRKoNWobats14dQcBOSoRQTIWjM4bk0cDWK3CqKM
          09VUP0bNHFWmcNsSOoeTdZ+n0qA=
        </X509Certificate>
      </X509Data>
      <X509Data>
        <X509Certificate>
          MIIEwzCCA6+gAwIBAgIQaguZT8AAHasR2sQCoWYnujAJBgUrDgMCHQUAMHAxKzApBgNVBAsT
          IkNvcHlyaWdodCAoYykgMTk5NyBNaWNyb3NvZnQgQ29ycC4xHjAcBgNVBAsTFU1pY3Jvc29m
          dCBDb3Jwb3JhdGlvbjEhMB8GA1UEAxMYTWljcm9zb2Z0IFJvb3QgQXV0aG9yaXR5MB4XDTA2
          MDQwNDE3NDQxNFoXDTEyMDQyNjA3MDAwMFowgaYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpX
          YXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9y
          YXRpb24xKzApBgNVBAsTIkNvcHlyaWdodCAoYykgMjAwMCBNaWNyb3NvZnQgQ29ycC4xIzAh
          BgNVBAMTGk1pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBMIIBIDANBgkqhkiG9w0BAQEFAAOC
          AQ0AMIIBCAKCAQEAw8wgjbzf/z5Q7nrC1CQl9nbOIf/NKlZOypy3grI1eS0AxKgI1WPJt6X2
          6cHB1rGMlqIH+g+2glKa64LGvRDFqMDua4SOUxu7UPpkAYnBFtSCaABAeET1EjhO+2NR4Po9
          ueU3sd9jByM7cUA0R/Rrrkb1J3MeIstCGR5RtlKa06PQE8YZP3EGbfKVIURfQu3AyZlkILjB
          NPyiROZ7sh0vuKbe9KHfmyEP/lgxQVU4fq9Y5+TsWXklq/cqLxE/OHg+Qn+naOR+ImgX5kqS
          xHhEUkehT4SJk5vAZ3vqCfuGA332mXE8K6dmmMzfLeIrAhoPNEhl9TwSr/GHHB0mUm/MAwIB
          A6OCASowggEmMBMGA1UdJQQMMAoGCCsGAQUFBwMDMIGiBgNVHQEEgZowgZeAEFvQcO9pcp4j
          UX4Usk2O/8uhcjBwMSswKQYDVQQLEyJDb3B5cmlnaHQgKGMpIDE5OTcgTWljcm9zb2Z0IENv
          cnAuMR4wHAYDVQQLExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xITAfBgNVBAMTGE1pY3Jvc29m
          dCBSb290IEF1dGhvcml0eYIPAMEAizw8iBHRPvZj7N9AMBIGCSsGAQQBgjcVAQQFAgMDAAQw
          HQYDVR0OBBYEFCX4K0tdyHJUreX2oCoXFvvB+VOBMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIA
          QwBBMAsGA1UdDwQEAwIBRjAPBgNVHRMBAf8EBTADAQH/MAkGBSsOAwIdBQADggEBAGPj4PMF
          uLDqCws00YIxPoliRdUIp/lhZcguA/o4SEHPtfIng9PjxVZTqLUZzszm8aD5VrZIlEck5akf
          3HrU9hZ6EtvzkBvsCF2zhZC5jFi7HMyV05WUM/SR3v+Im15LSVA5JjogG1Q3/H1cFZPD3ByO
          8GFSPOUH7WbveeyPzldjZZUYSaB632W33yau/sgStsaizMZfi3Dzyturgm4H3GUZuaj2hsIJ
          QpjxJqxperHBK6ewZh+lr4cIa5cTuLA2mR4FoxM4o8CsMD66IdcwpspiEhyvV43l8XoRul48
          DDfxk8GSiE4EWgVcx8/WqdnhfZF4J/u0bqWPBjNYsV4qEQ8=
        </X509Certificate>
      </X509Data>
    </KeyInfo><Object id="ts-countersig"><X509Data><X509Certificate>MIID/zCCAuegAwIBAgIQDekr8NTYKYgYMgUJXpp2iDANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQG
EwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xKzApBgNVBAMTIlZlcmlTaWduIFRpbWUgU3Rh
bXBpbmcgU2VydmljZXMgQ0EwHhcNMDMxMjA0MDAwMDAwWhcNMDgxMjAzMjM1OTU5WjBXMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xLzAtBgNVBAMTJlZlcmlTaWduIFRpbWUg
U3RhbXBpbmcgU2VydmljZXMgU2lnbmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
slAoSN3TaHqEGERmdV1+xLifYyb/PUOcfBE4ECVVc9l1J2n9TrkgXNMK+aAbKu1VViFh2B7b5Lwz
a8fv3aM3ZY4bkwy2Ux5cfGY1XwWKRf52Tt9TgKKBIJ2uiFyiCPflMPnuIjdMQgrO38YfxNZV6YE/
tVKjLKoBevKiqo01/p/mXWoFnz1r47+WwP7MYPlA5wegROuBUW6lKvK2ihAo7Y/cBqCGUJp7SggN
MB3KEJ5r9+lYrgSpQJmyKOiPFqw841NvS9M1nbVvZB2zliy7Ped56216+RbmJq2v75lTt0Aslbh5
qv7UUqspdH5C7DkeomoW5lm7JGjYAIBDEIeAawIDAQABo4HKMIHHMDQGCCsGAQUFBwEBBCgwJjAk
BggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMAwGA1UdEwEB/wQCMAAwMwYDVR0f
BCwwKjAooCagJIYiaHR0cDovL2NybC52ZXJpc2lnbi5jb20vdHNzLWNhLmNybDAWBgNVHSUBAf8E
DDAKBggrBgEFBQcDCDAOBgNVHQ8BAf8EBAMCBsAwJAYDVR0RBB0wG6QZMBcxFTATBgNVBAMTDFRT
QTIwNDgtMS01NDANBgkqhkiG9w0BAQUFAAOCAQEAh3hw2k5SASBb4HnJgjDE/bkZlr2RAMO9zc3G
9A7Y//lNwDNiMBHF9XQb1JLeX5wgE7F8Rb5QzYPngBeDpyeTZxNG+8q4mEEDzJtRWwWLf6hv8xtQ
GyQu8mmNbCL3u8oWle0MdMBod9nrmWKHwXOQ+Il0eiOro5h7l7H3jylxTS51G0hB2vC1DSBU1neg
l4Jjaf0Jz4rwdbsJm9n5EVUmmmEyvnoCsHuGvqLDiyIseNE1drySc1z5ueZMFQojzOTS1DQuSUAV
PA9geiTGpWbvls9w6z7n9A1+3NF8o3ZxacGcT0cwNSGxoq8aYjwr2Y6qKgd72BizXHvinaVv/jyJ
rQ==</X509Certificate></X509Data><X509Data><X509Certificate>MIIDxDCCAy2gAwIBAgIQR78Zld+NUkZD99ttSA0xpDANBgkqhkiG9w0BAQUFADCBizELMAkGA1UE
BhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNV
BAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0
ZSBUaW1lc3RhbXBpbmcgQ0EwHhcNMDMxMjA0MDAwMDAwWhcNMTMxMjAzMjM1OTU5WjBTMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xKzApBgNVBAMTIlZlcmlTaWduIFRpbWUg
U3RhbXBpbmcgU2VydmljZXMgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpyrKk
zM0grwp9iayHdfC0TvHfwQ+/Z2G9o2Qc2rv5yjOrhDCJWH6M22vdNp4Pv9HsePJ3pn5vPL+Trw26
aPRslMq9Ui2rSD31ttVdXxsCn/ovax6k96OaphrIAuF/TFLjDmDsQBx+uQ3eP8e034e9X3pqMS4D
mYETqEcgzjFzDVctzXg0M5USmRK53mgvqubjwoqMKsOLIYdmvYNYV291vzyqJoddyhAVPJ+E6lTB
Cm7E/sVK3bkHEZcifNs+J9EeeOyfMcnx5iIZ28SzR0OaGl+gHpDkXvXufPF9q2IBj/VNC97QIlao
lc2uiHau7roN8+RN2aD7aKCuFDuzh8G7AgMBAAGjgdswgdgwNAYIKwYBBQUHAQEEKDAmMCQGCCsG
AQUFBzABhhhodHRwOi8vb2NzcC52ZXJpc2lnbi5jb20wEgYDVR0TAQH/BAgwBgEB/wIBADBBBgNV
HR8EOjA4MDagNKAyhjBodHRwOi8vY3JsLnZlcmlzaWduLmNvbS9UaGF3dGVUaW1lc3RhbXBpbmdD
QS5jcmwwEwYDVR0lBAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQDAgEGMCQGA1UdEQQdMBukGTAX
MRUwEwYDVQQDEwxUU0EyMDQ4LTEtNTMwDQYJKoZIhvcNAQEFBQADgYEASmv56ljCRBwxiXmZK5a/
gqwB1hxMzbCKWG7fCCmjXsjKkxPnBFIN70cnLwA4sOTJk06a1CJiFfc/NyFPcDGA8Ys4h7Po6JcA
/s9Vlk4k0qknTnqut2FB8yrO58nZXt27K4U+tZ212eFX/760xX71zwye8Jf+K9M7UhsbOCf3P0o=</X509Certificate></X509Data><CounterSignature xmlns="http://schemas.microsoft.com/xmldsig/timestamp/2003" ts-format="cms-timestamp-message">MIIDLQYJKoZIhvcNAQcCoIIDHjCCAxoCAQExDjAMBggqhkiG9w0CBQUAMIIBEwYJKoZIhvcNAQcB
oIIBBASCAQCQgXQ8T9JIc/7d5aX5bqtGWlP83ppfGZB9fyWwViJa0o8ufQ45XQ5CUBNIsqziIhd/
mWXYLPsVmERlCj3vMAQjfCCCbi6Mj7R2cCkAwkm6eIPDXnrFhmnGnH5TPzrl3Uuh9QPz/POqS3Ul
o1eKg+mPvOquA/PfQtf6hyWHhEfEQ1yzBrBT3UYz6vIGWHQYSS/81dOH5LtsxTfFE2UIgNVCjo4k
4czR9ZDJvA1o/VJPibmqKpmV2iadoLMbRj1u5at+u5vkBrHaUbSXAuo6cRkaNiEjecnszbV5FtDX
IdqF6YT6eudm5bRr+yVtmo1UlIfUSAmY1WpR8KKf9s/if/oZMYIB7DCCAegCAQEwZzBTMQswCQYD
VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xKzApBgNVBAMTIlZlcmlTaWduIFRpbWUg
U3RhbXBpbmcgU2VydmljZXMgQ0ECEA3pK/DU2CmIGDIFCV6adogwDAYIKoZIhvcNAgUFAKBZMBgG
CSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA2MTEyNjIzNTk1NlowHwYJ
KoZIhvcNAQkEMRIEEKz/5SROWYLaA3FwkG9xCoowDQYJKoZIhvcNAQEBBQAEggEAWIy5CZf6geC7
pdTTNrq8IlskYnUF48jsPRvAojIk+RBjggj6NxlpTGslHjVZffDOmcVIyMOw/Zl9Q2DdlmSb2nhU
7PX4ue7zygGwGw30eP/BKYdz3iOHRUKGRHdhC0sg+pAvyRttgX5t4pJ4uBiG0hLUscaLyLWkQayL
QObVuQijdS3/Ddd+VOCIfOEAbFlSqX0ETedK+mI/F8V4hsyPEjdwVGhc2aQOuobpAFgrtlQWY3Yy
TlTEL8iN9KgrdXrlbxm6uIWSqRi9W6NyuK8KrtvE47jaX489PPjHRfBBCLN1FJYIqcwjtdvg/lwe
KH0WPBl4SwuWUb/5amioNLGADg==</CounterSignature></Object></Signature></ObjectCollector>