Wednesday, January 12, 2011

Counting Number of Public Folders

Below I will show you a method to count the number of public folders you have in your Exchange organisation for both Exchange 2003 and Exchange 2007/2010.

Exchange 2003

For Exchange 2003 download PFDavAdmin from the following location:

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=635BE792-D8AD-49E3-ADA4-E2422C0AB424&displaylang=en

In PFDavAdmin click Tools --> Options. Enable logging to a file.



Then click Tools --> Content Report. Select All public folders for the scope.



Specify a location where to save the report.

When the report finishes generating you will have on your screen the total number of public folders residing on the server.



Exchange 2007/2010

Exchange 2007/2010 has native powershell support. Chris Schrimsher has produced a script that will automatically count the number of public folders you have in your organisation. To get a copy of his script please view the following link:

http://blogs.technet.com/b/gary/archive/2009/09/23/counting-public-folder-subfolders.aspx

SQL System Databases

Master Database

Purpose

Core system database to manage the SQL Server instance. In SQL Server 2005, the Master database is the logical repository for the system objects residing in the sys schema. In SQL Server 2000 and previous editions of SQL Server, the Master database physically stored all of the system objects.

Prominent Functionality

- Per instance configurations
- Databases residing on the instance
- Files for each database
- Logins
- Linked\Remote servers
- Endpoints

Additional Information

- The first database in the SQL Server startup process
- In SQL Server 2005, needs to reside in the same directory as the Resource database

Resource Database

Purpose

The Resource database is responsible for physically storing all of the SQL Server 2005 system objects. This database has been created to improve the upgrade and rollback of SQL Server system objects with the ability to overwrite only this database.

Prominent Functionality

- System object definition

Additional Information

- Introduced in SQL Server 2005 to help manage the upgrade and rollback of system objects
- Prior to SQL Server 2005 the system related data was stored in the master database
- Read-only database that is not accessible via the SQL Server 2005 tool set
- The database ID for the Resource database is 32767
- The Resource database does not have an entry in master.sys.databases

TempDB

Purpose

Temporary database to store temporary tables (#temptable or ##temptale), table variables, cursors, work tables, row versioning, create or rebuild indexes sorted in TempDB, etc. Each time the SQL Server instance is restarted all objects in this database are destroyed, so permanent objects cannot be created in this database.

Prominent Functionality

- Manage temporary objects listed in the purpose above

Additional Information

- Each time a SQL Server instance is rebooted, the TempDB database is reset to its original state

Model Database

Purpose

Template database for all user defined databases. This is the template that is used when creating a new database.

Prominent Functionality

- Objects
- Columns
- Users

Additional Information

- User defined tables, stored procedures, user defined data types, etc can be created in the Model database and will exist in all future user defined databases
- The database configurations such as the recovery model for the Model database are applied to future user defined databases

MSDB Database

Purpose

Primary database to manage the SQL Server Agent configurations

Prominent Functionality

- SQL Server Agent Jobs, Operators and Alerts
- DTS Package storage in SQL Server 7.0 and 2000
- SSIS Package storage in SQL Server 2005

Additional Information

- Provides some of the configurations for the SQL Server Agent service
- For the SQL Server 2005 Express edition installations, even though the SQL Server Agent service does not exist, the instance still has the MSDB database

Distribution

Purpose

Primary data to support SQL Server replication.

Prominent Functionality

- Database responsible for the replication meta data
- Supports the data for transaction replication between the publisher and subscriber(s)

ReportServer

Purpose

Primary database for Reporting Services to store the meta data and object definitions.

Prominent Functionality

- Reports security
- Job schedules and running jobs
- Report notifications
- Report execution history

ReportServerTempDB

Purpose

Temporary storage for Reporting Services

Prominent Functionality

- Session information
- Cache

Exchange Public Folder Tools

pfadmin 1.3
Available at: ftp://ftp.microsoft.com/pss/tools/Exchange%20Support%20Tools/PFAdmin/Used for: imports, or interactively
Works with: Exchange 5.5, 2000, 2003
Description: This is the original pfadmin from the Exchange 5.5 days. The most typical use is for running permissions imports that were generated with pfinfo 3.x, which are made up of SETACL command lines. You can also use it interactively to run SETACL and SETREPLICA commands. Pfadmin lets you view the current permissions and replicas using LISTACL and LISTREPLICAS respectively. However, these dumps can not be imported since they don't use SETACL or SETREPLICAS command format.

pfinfo 3.x
Available at: ftp://ftp.microsoft.com/pss/tools/Exchange%20Support%20Tools/PFInfo/55/
Used for: exporting permissions in pfadmin 1.3 command syntax, also reports certain properties
Works with: Exchange 5.5
Description: This is the original pfinfo from the Exchange 5.5 days. The most typical use is for running permissions exports, which are actually just a list of SETACL commands. These can be imported using pfadmin 1.3. Pfinfo also generates a report that includes various other properties of the folder, such as item count and folder size. The property export can not be imported. You can try running this against Exchange 2000 and 2003, but you will find that in some cases subfolders will appear as root folders in the export, because pfinfo gets the folder path from the directory object, which is not always populated in 2000 and 2003.

pfadminE2K
Available at: ftp://ftp.microsoft.com/pss/tools/Exchange%20Support%20Tools/PFAdmin/Used for: imports
Works with: Exchange 2000 RTM only
Description: This is an updated pfadmin for Exchange 2000, but it is not widely used due to several shortcomings. First, its command and permissions syntax is completely different from pfadmin 1.3, meaning you can't import your old pfinfo exports with the new pfadminE2K. Second, with E2K Sp1 and later, most operations fail. It only works reliably with the RTM version of E2K.

pfinfoE2K
Available at: ftp://ftp.microsoft.com/pss/tools/Exchange%20Support%20Tools/PFInfo/2000/
Used for: exporting permissions in pfadminE2K command syntax, also reports certain properties
Works with: Exchange 2000 RTM only
Description: This is the updated pfinfo for Exchange 2000, which was also not widely used for similar reasons. The new permissions export format made it incompatible with any tool except pfadminE2K, and it only works reliably with E2K RTM.

OutlookFolders
Available at: ftp://ftp.microsoft.com/pss/tools/Exchange%20Support%20Tools/Outlook_Folders/
Used for: exports permissions in pfadmin 1.3 command syntax
Works with: Exchange 5.5, 2000, 2003
Description: This utility accesses Exchange via a MAPI profile, and thus it works with any version of Exchange. It generates permissions exports in pfadmin 1.3 SETACL command syntax.

PFDavAdmin
Available at: ftp://ftp.microsoft.com/pss/tools/Exchange%20Support%20Tools/PFDavAdmin/
Used for: exporting and importing permissions and replica lists in pfadmin 1.3 command syntax, version 2.3 and later exports properties
Works with: Exchange 2000, 2003
Description: PFDavAdmin accesses the information store through webDAV, thus the name, and was originally written to correct non-canonical DACLs on public folders. Its features eventually expanded to include imports and exports of permissions and replicas in pfadmin 1.3 command syntax. Version 2.3 and later can also export properties such as item count (PR_CONTENT_COUNT) and folder size (PR_MESSAGE_SIZE) into a tab-delimited file similar to the old pfinfo output (which also can not be imported, just like the old pfinfo output). In addition, it can be used to propagate single permissions and replicas down a tree of subfolders, instead of overwriting as ESM does. It has other features as well, which are discussed in the included doc.

pfmigrate
Available at: http://www.microsoft.com/exchange/downloads/2003/default.mspx, as part of the E2K3 deployment tools
Used for: adding and removing replicas for all folders on a server, site consolidation
Works with: Exchange 2000, 2003
Description: Pfmigrate is especially useful for Exchange 2003 Sp1 site consolidation, since it changes the legacy DN of a public folder, which no other utility does. Site consolidation is outside the scope of this article. However, pfmigrate can also be used to simply add replicas of all folders on one server to another server, and remove replicas of all folders from the original server.

exdeploy
Available at: http://www.microsoft.com/exchange/downloads/2003/default.mspx, as part of the E2K3 deployment tools
Used for: besides other things that exdeploy is used for, the /pubfoldcheck switch is of interest in regards to public folders as /pubfoldcheck runs a part of the DS/IS Consistency Adjuster that removes the unknown accounts from public folder ACLs. Those unknown accounts, if unhandled, could then get replicated to Exchange 200x servers as zombie users, thus causing problems. Exdeploy /pubfoldcheck can be scripted and run against multiple servers. NOTE: earlier version of exdeploy help stated that /pubfoldcheck also synchronized the public folder store and the Exchange directory (which could possibly cause public folders to be rehomed). This is however incorrect and it has been fixed in the new version of help file available with the tool at the above link.

ExFolders - Exchange 2010 RTM
Available at: http://msexchangeteam.com/files/12/attachments/entry453398.aspxThis is the ExFolders tool, an Exchange 2010 (RTM) compatible replacement for the PFDAVAdmin tool.

ExFolders - Exchange 2010 SP1
Available at: http://msexchangeteam.com/files/12/attachments/entry456255.aspxThis is the ExFolders tool, an Exchange 2010 (SP1) compatible replacement for the PFDAVAdmin tool.

More about the new Exchange 2010 ExFolders tool:
http://msexchangeteam.com/archive/2009/12/04/453399.aspx


This is an updated version of Bill Long's article. The original article can be found here:
http://msexchangeteam.com/archive/2004/11/05/252979.aspx

Exchange Jetstress

Use Jetstress 2010 to verify the performance and stability of a disk subsystem prior to putting a Microsoft Exchange Server 2003, 2007 and 2010 server into production. Jetstress helps verify disk performance by simulating Exchange disk Input/Output (I/O) load. Specifically, Jetstress simulates the Exchange database and log file loads produced by a specific number of users. You use Performance Monitor, Event Viewer, and ESEUTIL in conjunction with Jetstress to verify that your disk subsystem meets or exceeds the performance criteria you establish. After a successful completion of the Jetstress Disk Performance and Stress Tests in a non-production environment, you will have ensured that your Exchange disk subsystem is adequately sized (in terms of performance criteria you establish) for the user count and user profiles you have established. It is highly recommended that the Jetstress user read through the tool documentation before using the tool.

You should always run Jetstress on your new Exchange 2003/2007 or 2010 server before putting it into production.

Download the x86 version here:
http://www.microsoft.com/downloads/en/details.aspx?familyid=94b9810b-670e-433a-b5ef-b47054595e9c&displaylang=en

Download the x64 version here:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=13267027-8120-48ed-931b-29eb0aa52aa6

Tuesday, January 11, 2011

Microsoft-Windows-GroupPolicy Event ID 1006

I had a very frustrating issue today with group policy at a client on a few member servers running Windows Server 2008 R2.

A quick google showed DNS as a cause - I checked my DNS configuration and it was correct so I discarded this as the reason.

A few member servers were receiving the following error:



Log Name: System
Source: Microsoft-Windows-GroupPolicy
Date: 12/01/2011 11:51:40 AM
Event ID: 1006
Task Category: None
Level: Error
Keywords:
User: SYSTEM
Computer: torwmg832.domain.local
Description:
The processing of Group Policy failed. Windows could not authenticate to the Active Directory service on a domain controller. (LDAP Bind function call failed). Look in the details tab for error code and description.


On the details tab I was getting ErrorCode 49.



The following TechNet article from Microsoft says Error Code 49 is the following:

Error code 49 (Invalid credentials)
This error code might indicate that the user's password expired while the user is still logged on the computer.
To correct invalid credentials:
1. Change the user's password.
2. Lock/unlock the workstation.
3. Check if there are any system services running as the user account.
4. Verify the password in service configuration is correct for the user account.

http://technet.microsoft.com/en-us/library/cc727283.aspx

This error code description from Microsoft completely threw me off track diagnosing the computer account passwords, rejoining PC's to the domain and diagnosing the Kerberos Key Distribution Center (KDC) service.

All tests against the domain using nltest for the computer account were passing successfully!

/SC_QUERY: - Query secure channel for Domain on ServerName



I was confident it was nothing to do with authentication!

There were so many forum posts on the Internet leading to DNS as being the cause for this error. I decided to revisit my name resolution even though DNS was working correctly.

I checked the local host file. It was full of entries.



Removed these entries and the problem was resolved. A very simple fix for such a painful problem.

Hopefully this post will stop others from going through my pain!

Monday, January 10, 2011

Exchange 2010 Storage Planning and Testing

I have been arguing with clients for the last 2 years against purchasing expensive SAN's and RAID solutions to run their Exchange 2010 infrastructure. I explain to them a mailbox server or a disk is not important. Set your infrastructure up so you can remove any server from the equation and allow users to continue to receive email!

I get IT professionals and and Solution Architects look at me like I'm an idiot when I say things like "you don't even need RAID on your cheap mailbox servers in many cases".

Before purchasing expensive storage infrastructure to run Exchange 2010 please read the following article:

http://msexchangeteam.com/archive/2011/01/07/457471.aspx

A big thank you to Robert Gillies from Microsoft for taking the time to document Exchange 2010 storage and giving me some backup in my arguments with customers.

Exchange Cloud Based Archives with Office 365

Exchange Server 2010 RTM released archives allowing you to archive the users mailbox within the same Exchange mailbox database.

Exchange Server 2010 SP1 made it possible to store your archive mailboxes in a different mailbox database on the Exchange 2010 server.

With Office 365 beta, we can now enable organizations to store archive mailboxes in the cloud, while maintaining the primary mailbox on your on-premises Mailbox servers running Exchange 2010 SP1. Users can seamlessly access their primary on-premises mailbox and their archive in the cloud using Outlook 2010, Outlook 2007 and Outlook Web App (OWA).





http://msexchangeteam.com/archive/2011/01/10/457525.aspx

Thursday, January 6, 2011

Exchange Journaling Questions

Is it possible for my email to get journaled more then once by a single hub transport server?

Yes it is. With Exchange 2010, it's possible to have that message journalized several times because of the way the transport expands the Distribution List. The transport will try to send the message as soon as possible, so it "chips" the DL into chucks of 1000processes each chuck with any enabled transport agents (including the journal agent) then sends the first chuck of 1000. If you have a DL of, say, 4500 members, you'd get 5 messages in the journal. You can change the size of the "chip" to a value large enough that no DL would have more than the value of the "ExpansionSizeLimit". You have to make that change in the file edgetransport.exe.config on each HT server and then restart the transport service.

This is explained on the following link:

http://clintboessen.blogspot.com/2011/01/email-gets-journaled-multiple-times-for.html

If an email passes through multiple Hub Transport servers is it journaled more then once as it's being processed by multiple transport agents? Hub Transport servers marked as Hub Sites can cause emails to be processed by multiple Hub Transport servers along the way.

No emails are only ever processed by one journal agent. Once an email passes through the first Hub Transport server the Transport Agent or Journal Agent "stamps" the email as being processed in the message header with X-MS-Exchange-Organization-Processed-By-Journaling x-header, so other Hub Transport servers can determine it’s already journaled. This prevents the Journal Agent or Transport Agent from processing it more then once.

Email gets Journaled Multiple times for Large Distribution Lists

With Exchange 2010, it's possible to have that message journalized several times because of the way the transport expands the Distribution List. The transport will try to send the message as soon as possible, so it "chips" the DL into chucks of 1000processes each chuck with any enabled transport agents (including the journal agent) then sends the first chuck of 1000. If you have a DL of, say, 4500 members, you'd get 5 messages in the journal. You can change the size of the "chip" to a value large enough that no DL would have more than the value of the "ExpansionSizeLimit". You have to make that change in the file edgetransport.exe.config on each HT server and then restart the transport service.

A big thankyou to Rich Matheisen [MVP] for explaining this to me.

[EDIT]

The following comment was made from Ross Smith from Microsoft:

We don’t recommend changing the chipping size as it is a feature to help with memory management. Sure you can manipulate a knob and increase the number, but ultimately either a) there will be performance issues (undefined) or b) a message will still contain more recipients than the custom number entered. In other words, there is no guarantee a single message will always be used when generating the journal report.

Exchange 2010 Group Metrics

Every organisation only contains one mailbox server responsible for generating the Offline Address Book. This server is known as the OAB Generation server. The OAB Generation server then distributes the OAB to Client Access Servers for distribution to Outlook clients. I explained this process on a previous blog post.

Please see:
http://clintboessen.blogspot.com/2009/05/how-oab-distribution-works.html

The mailbox server running OABGen also has another role, to generate group metrics. Group metrics counts the members of all groups periodically on mailbox servers, and uses Exchange File Distribution to get the group metrics files out to CAS servers. Exchange File Distribution is the same method used in OAB distribution.

The Exchange 2010 mailbox server will have a share called \\mailboxserver\GroupMetrics where your group metrics are generated. If you're not seeing that on any mailbox servers, you're not generating group metrics. When you look in that share, make sure the files in it have been changed within the past 24 hours. Restarting the Exchange Service Host will generate a fresh file; that process may take minutes or hours depending on the number of groups in your organization. Also, make sure the Exchange File Distribution service is running on Client Access servers and Mailbox servers, and that your CASes can connect to \\mailboxserver\GroupMetrics.

It is possible to separate the mailbox servers generating OABGen and Group Metrics. To configure a different server to generate Group Metrics use the following command:

Set-MailboxServer -GroupMetricsGenerationEnabled $true

I do not recommend this however as both the OABGen and Group Metrics generation roles cannot be clustered or made highly available in anyway. As a result it is best to put both these tasks on the same box so your mentally aware of the single point of failure (SPOF).

What are Group Metrics used for?

Group metrics counts the members of all groups periodically on mailbox servers. Group metrics is used by a Mail Tip which counts the number of users your about to send an email to.

Recover Deleteded Items and Mailbox Quota's

An item that is often asked about is does the Recover Deleted Items folder contribute to the users mailbox quota? The answer is No. Microsoft has documented this on TechNet under a bazaar location.

http://technet.microsoft.com/en-us/library/ee861123.aspx

Items in the Recoverable Items folder aren't calculated toward the user's mailbox quota. In Exchange 2010, the Recoverable Items folder has its own quota. When a user's Recoverable Items folder exceeds the warning quota for recoverable items (as specified by the RecoverableItemsWarningQuota parameter), an event is logged in the Application event log of the Mailbox server. When the folder exceeds the quota for recoverable items (as specified by the RecoverableItemsQuota parameter), users won't be able to empty the Deleted Items folder or permanently delete mailbox items. Also copy-on-write won't be able to create copies of modified items. Therefore, it's critical that you monitor the Recoverable Items quotas for mailbox users placed on litigation hold.

For mailbox databases, the default RecoverableItemsWarningQuota and RecoverableItemsQuota values are set to 20 Gb and 30 Gb respectively. These settings are usually sufficient for storing several years of mailbox data when on litigation hold. To modify these values for a mailbox database, use the Set-MailboxDatabase cmdlet. To modify them for individual mailboxes, use the Set-Mailbox cmdlet.

Wednesday, January 5, 2011

DAG Failover and Journaling

DAG Failover and Journaling is not an area highlighted on TechNet. If you configure journaling on a mailbox database and a failover of that mailbox database occurs what happens with the journaling? Does it still work?

The answer is Yes... Let me explain.

When a journal rule is created it is stored in Active Directory. The journal rule is replicated to all domain controllers throughout your infrastructure and applied to all Hub Transport servers in the Exchange 2010 organization.

When a mailbox database fails over from Site1 to Site2, the hub transport server in Site2 will still have the journal rules applied as it was replicated using Active Directory replication. The store driver on the hub transport servers in Site2 will pull the emails from the failed over database as it would in Site1. The journal agents on the hub transport servers in Site2 would then process the journal rules.

It doesn't matter what location the mailbox database is located, it will always be journaled if the rule is configured!

Warning...

If you journal all emails coming in and out of a mailbox database the the disk I/O will be two times the typical disk I/O. It is recommended that a separate server be setup to act as a journaling server and to hold the journal recipient mailboxes. If your journal recipient mailbox is located in Site1 and the mailbox database being journaled is located in Site2 due to a DAG failover then all journal emails will be replayed back to Site1 which can cause WAN link congestion.

Journal Rule wont work right away on Groups?

You have created a journal rule which you have applied to a distribution/security group. Every email sent through this distribution/security group. However when you add a user to this distribution group the email they send or receive is not journalled for sometimes up to half a day. Why is this?

Each Hub Transport server caches distribution group membership. This reduces load on your Active Directory domain controllers. By default, entries in the expanded groups cache expire in four hours.

I don't want to wait the 4 hours?

If you want to make group membership changes immediate so journaling takes effect right away you must restart the Microsoft Exchange Transport service on each Hub Transport server. This will force an immediate update of the recipient cache. You must do this for each Hub Transport server where you want to forcibly update the recipient cache.

For more information on journaling take a look at:

http://technet.microsoft.com/en-us/library/aa998649.aspx

Wednesday, December 22, 2010

451 4.4.0 DNS query failed

Problem: Emails to a particular domain were not going through. Emails to all other domains were being received fine.

dcswa-ex01 = Edge Transport
dcswa-ex02 = Hub Transport

domain.com = sending companies email suffix.
example.com = recieving companies email suffix.

Symptoms

Emails sent to example.com are not arriving to the destination. Doriseng.com emails are being passed from the hub transport server dcswa-ex02 to the edge transport server dcswa-ex01 successfully. The emails then sit in the edge transport queue for example.com with the following error:

LastError : 451 4.4.0 DNS query failed



Dcswa-ex01 is resolving DNS correctly for example.com, we can verify this by using the nslookup utility.



The edge transport server Dcswa-ex01 is able to open TCP25 connections to example.com SMTP servers.



The Exchange 2010 connectivity logs shows that the DNS queries exchange is generating for example.com were timing out on the edge transport server:

2010-12-22T02:26:15.708Z,08CD6F05CD2DBD8F,SMTP,example.com,+,DnsConnectorDelivery afb8a1d5-3e6f-4e6b-8bab-17e38b9d7bad;QueueLength=1
2010-12-22T02:27:21.458Z,08CD6F05CD2DBD8F,SMTP,example.com,>,DNS server returned ErrorTimeout reported by 0.0.0.0
2010-12-22T02:27:21.458Z,08CD6F05CD2DBD8F,SMTP,example.com,-,Messages: 0 Bytes: 0 (The DNS query for 'DnsConnectorDelivery':'example.com':'afb8a1d5-3e6f-4e6b-8bab-17e38b9d7bad' failed with error : ErrorTimeout)


Resolution

On the Edge Transport server dcswa-ex01 set the external DNS servers to use for external mail relay.



On the hub transport server dcswa-ex01 configure "Use the External DNS Lookup setting on the transport server" for all send connectors configured for edge sync with dcswa-ex01.



Force an Edge Sync on the hub transport server dcswa-ex02:



Restart the Microsoft Exchange Transport service on the edge transport server to utilize the new DNS settings.

After making this change it took 5-10 minutes for the email to successfully leave the queue!

Looking at the queue for example.com again:



The email was successfully delivered as it no longer resides in the queue.

If we look at the SMTP send log on the edge transport server dcswa-ex01 we can see that the email transferred correctly. One interesting thing I found about example.com was they are digitally encrypting all email communication traffic, I don't see how this would cause DNS to fail but I want to point that out.

2010-12-22T03:59:00.740Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,0,,81.80.156.146:25,*,,attempting to connect
2010-12-22T03:59:01.052Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,1,202.160.101.139:2546,81.80.156.146:25,+,,
2010-12-22T03:59:01.365Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,2,202.160.101.139:2546,81.80.156.146:25,<,220 example.com [ESMTP Server] service ready;DORIS ENGINEERING Email Gateway ok; 12/22/10 04:57:30, 2010-12-22T03:59:01.365Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,3,202.160.101.139:2546,81.80.156.146:25,>,EHLO dcswa-ex01.cloud.dcswa,
2010-12-22T03:59:01.677Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,4,202.160.101.139:2546,81.80.156.146:25,<,250-example.com, 2010-12-22T03:59:01.677Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,5,202.160.101.139:2546,81.80.156.146:25,<,250-SIZE 13631488, 2010-12-22T03:59:01.677Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,6,202.160.101.139:2546,81.80.156.146:25,<,250-8BITMIME, 2010-12-22T03:59:01.677Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,7,202.160.101.139:2546,81.80.156.146:25,<,250 STARTTLS, 2010-12-22T03:59:01.677Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,8,202.160.101.139:2546,81.80.156.146:25,>,STARTTLS,
2010-12-22T03:59:01.974Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,9,202.160.101.139:2546,81.80.156.146:25,<,220 Ready to start TLS, 2010-12-22T03:59:01.974Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,10,202.160.101.139:2546,81.80.156.146:25,*,,Sending certificate 2010-12-22T03:59:01.974Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,11,202.160.101.139:2546,81.80.156.146:25,*,CN=dcswa-ex01,Certificate subject 2010-12-22T03:59:01.974Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,12,202.160.101.139:2546,81.80.156.146:25,*,CN=dcswa-ex01,Certificate issuer name 2010-12-22T03:59:01.974Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,13,202.160.101.139:2546,81.80.156.146:25,*,67E29A29EDE76AAF4BDBC5340D3185F0,Certificate serial number 2010-12-22T03:59:01.974Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,14,202.160.101.139:2546,81.80.156.146:25,*,2A3B56F723AD7056F9372E486B3192E0EF877C6D,Certificate thumbprint 2010-12-22T03:59:01.990Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,15,202.160.101.139:2546,81.80.156.146:25,*,dcswa-ex01;dcswa-ex01.cloud.dcswa,Certificate alternate names 2010-12-22T03:59:02.646Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,16,202.160.101.139:2546,81.80.156.146:25,*,,Received certificate 2010-12-22T03:59:02.646Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,17,202.160.101.139:2546,81.80.156.146:25,*,B6CDD7D2A3CAC50AB653830A828037EC0D0B3901,Certificate thumbprint 2010-12-22T03:59:02.646Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,18,202.160.101.139:2546,81.80.156.146:25,>,EHLO dcswa-ex01.cloud.dcswa,
2010-12-22T03:59:02.958Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,19,202.160.101.139:2546,81.80.156.146:25,<,250-example.com, 2010-12-22T03:59:02.958Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,20,202.160.101.139:2546,81.80.156.146:25,<,250-SIZE 13631488, 2010-12-22T03:59:02.958Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,21,202.160.101.139:2546,81.80.156.146:25,<,250 8BITMIME, 2010-12-22T03:59:02.958Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,22,202.160.101.139:2546,81.80.156.146:25,*,29980,sending message 2010-12-22T03:59:02.958Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,23,202.160.101.139:2546,81.80.156.146:25,>,MAIL FROM: SIZE=5233,
2010-12-22T03:59:03.271Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,24,202.160.101.139:2546,81.80.156.146:25,<,250 Sender OK,
2010-12-22T03:59:03.271Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,25,202.160.101.139:2546,81.80.156.146:25,>,RCPT TO:,
2010-12-22T03:59:03.583Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,26,202.160.101.139:2546,81.80.156.146:25,<,250 Recipient OK,
2010-12-22T03:59:03.583Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,27,202.160.101.139:2546,81.80.156.146:25,>,RCPT TO:,
2010-12-22T03:59:03.896Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,28,202.160.101.139:2546,81.80.156.146:25,<,250 Recipient OK,
2010-12-22T03:59:03.896Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,29,202.160.101.139:2546,81.80.156.146:25,>,RCPT TO:,
2010-12-22T03:59:04.208Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,30,202.160.101.139:2546,81.80.156.146:25,<,250 Recipient OK,
2010-12-22T03:59:04.208Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,31,202.160.101.139:2546,81.80.156.146:25,>,DATA,
2010-12-22T03:59:04.521Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,32,202.160.101.139:2546,81.80.156.146:25,<,354 Start mail input; end with .,
2010-12-22T03:59:05.146Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,33,202.160.101.139:2546,81.80.156.146:25,<,250 OK: <1f3f0b7e00007399@example.com>,
2010-12-22T03:59:05.146Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,34,202.160.101.139:2546,81.80.156.146:25,>,QUIT,
2010-12-22T03:59:05.458Z,EdgeSync - Perth to Internet,08CD6F9DD3D5A300,35,202.160.101.139:2546,81.80.156.146:25,<,221 [ESMTP Server] service closing transmission channel,


There is another workaround that has been documented on the internet to add the external MX servers to the local "hosts" file on the edge transport server. I tested this and it does work however I do not recommend it. If another domain does fail, it will be a manual exercise on a case by case basis.

Tuesday, December 21, 2010

How to Force EdgeSync Synchronization

You can use the Start-EdgeSynchronization cmdlet to force synchronization to start immediately. You may want to do this to start initial replication immediately after you create the Edge Subscription or if you have made significant changes to the configuration or recipients in Active Directory. The Start-EdgeSynchronization cmdlet resets the EdgeSync synchronization schedule. The time of the subsequent synchronization intervals is based on the time that this command is initiated.

Note:
If you try to run this procedure during regular synchronization, an error will occur.

Start-EdgeSynchronization

How to Setup Auto QOS Cisco

The config below sets up Auto QOS (Quality of Service) on a Cisco Switch.

Single interface
Conf t
Int fa0/1
Auto-qos voip trust
End
Write mem


Multiple Interface
Conf t
Int range fa0/1 – 24 (to what ever port you want)
Auto-qos voip trust
End
Write mem

Sunday, December 12, 2010

Cisco ADSL Config with NAT

Below is a basic ADSL for Cisco routers with ADSL chip sets installed. This config if for a PPPoE based connection. I set this config up to use Amnet Broadband.

ip cef

interface ATM0
no ip address
no atm ilmi-keepalive
pvc 8/35
pppoe-client dial-pool-number 1
dsl operating-mode auto
hold-queue 224 in

interface Vlan1
ip address 10.60.59.1 255.255.255.0
ip nat inside
ip virtual-reassembly
ip tcp adjust-mss 1452


interface Dialer0
description Amnet ADSL
bandwidth 1300
ip address negotiated
ip mtu 1492
ip nat outside
ip virtual-reassembly
encapsulation ppp
dialer pool 1
dialer idle-timeout 999999
dialer-group 1
ppp authentication chap pap callin
ppp chap hostname USERNAME
ppp chap password 0 PASSWORD
ppp pap sent-username USERNAME password 0 PASSWORD

ip route 0.0.0.0 0.0.0.0 Dialer0

ip nat inside source list 1 interface Dialer0 overload

access-list 1 permit 10.60.59.0 0.0.0.255


To port forwards to the config create static NAT entries like this:

ip nat inside source static tcp 10.60.59.10 25 interface Dialer0 25
ip nat inside source static tcp 10.60.59.10 3389 interface Dialer0 3389


To get some verbose logging on your ADSL connection please see the following website:

https://supportforums.cisco.com/docs/DOC-14125

Monday, December 6, 2010

SBS 2008 System Synchronizing but Not Downloading Updates

I had an issue where wsus on a Windows SBS 2008 system was saying it was synchronizing successfully, but it wasn't downloading updates. All you would get was a message in the event logs from Windows Server Update Services (event id 10032) saying that "The server is failing to download some updates". Clients would show that they needed updates through the WSUS console and via the SBS Console, but the updates would never show up on the server for installation. In the local client WindowsUpdate.log file you would see something similar to the following

2010-10-12 10:39:45:574 784 1a20 PT +++++++++++ PT: Synchronizing server updates +++++++++++
2010-10-12 10:39:45:574 784 1a20 PT + ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, Server URL = http://...
2010-10-12 10:39:49:011 784 1a20 PT +++++++++++ PT: Synchronizing extended update info +++++++++++
2010-10-12 10:39:49:011 784 1a20 PT + ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, Server URL = http://...
2010-10-12 10:39:52:433 784 1a20 Agent * Found 0 updates and 57 categories in search; evaluated appl. rules of 643 out of 1075 deployed entities

So why would the WSUS server recognize the server needed updates and the client not recognize and download them? Further investigation uncovered the fact that the WSUS Content Repository was nearly empty. Total size of the repository was less than 100 MB. Obviously, none of the patch data had been downloaded.

So why was the sync successful? Moving on, after more investigation, I discovered that the ISA server was blocking what appeared to be anonymous web traffic from the SBS server even though there was a access rule set to allow all http, https, and ftp traffic from the SBS server. So, skipping to the solution. First, ISA 2004 has a problem with BITS 7.0 that is used in Windows 2008 and Windows 7. Because the initial synchronization from WSUS ONLY downloads metadata, ISA was letting that out and it would show success in the consoles. Then WSUS turns over processing and downloading of the actual patch files (.cabs, etc.) to BITS. ISA was blocking BITS background download processing so what we had was metadata for the updates, but no updates. WSUS knew the servers needed the updates, but the servers had nothing to download because the actual content for the updates wasn’t there. The fix is to change the processing of update downloads using BITS from a background to a foreground process. ISA seems to allow that just fine.

Do it by running the following query against the WSUS database. The connection can be made via SQL Management Studio Express in most cases…you are just looking to run the query against the SUSDB database.

update tbConfigurationC set BitsDownloadPriorityForeground=1

If you are using Windows 2008 with the Microsoft Internal Database (as SBS 2008 does), this proves to be a little more challenging because you have to connect with SQ Management Studio Express using named pipes instead of TCP/IP. Connect using named pipes by using this as the server

\\.\pipe\mssql$microsoft##ssee\sql\query

Sunday, December 5, 2010

HP ML350 G6 hangs at Completing Installation on a Windows 2008 and SBS2008

I had a HP ML350 G6 server that was unable to complete the SBS 2008 install. Everytime it would hang forever at the Completing Installation stage of the Windows setup.



All hardware roms were running latest firmware.

It got to the stage where I had to start removing server hardware to find out what was causing SBS Installation to fail.

The item that was causing the problem was a HP Smart Array P212 SAS Controller which was connected to a HP StorageWorks Ultrium 920 SAS Tape Drive. After removing this card the SBS 2008 installation completed successfully.

Below is a picture of this SAS Card taken from my iPhone 4G:



I removed this card, completed the install of SBS 2008, then installed the card again once Windows was up and running on the system.

Wednesday, December 1, 2010

VBS - List all users in OU

The following script lists all users in an organisational unit:

Set objDictionary = CreateObject("Scripting.Dictionary")

Set objOU = GetObject("LDAP://OU=myou,DC=domain,DC=local")
objOU.Filter = Array("User")

For Each objUser in objOU
strUser = objUser.displayName
If Not objDictionary.Exists(strUser) Then
Wscript.Echo strUser
End If
Next


Very handy if you want to add all users in an OU to a security group!

Monday, November 29, 2010

Use Windows 7 as a PPTP VPN Server

Today I was browsing technet and I found a link to a youtube video on how to setup Windows 7 to act as a PPTP VPN server for a home solution. This will allow computer savy home users to access any PC on their home network through a Windows 7 machine. I didn't even know this functionality was possible in Windows 7!

Check it out, here is the link:

http://www.youtube.com/watch?v=1s5JxMG06L4

Forefront Client Security Server Components Supported Operating Systems

Forefront Client Security (FCS) Server Components are not supported on all operating systems.

The Management Server must be setup on one of the following windows operating systems:

- Windows Server 2003 SP2 or later, Standard or Enterprise

- Windows Server 2008 Standard or Windows Server 2008 Enterprise

- Windows Server 2008 Standard SP1 or later, or Windows Server 2008 Enterprise SP1 or later

The following operating systems are not supported:

- Windows Server 2008 Server Core installation

- Windows Server 2008 R2

- x64 and Itanium server editions

- Microsoft Windows Small Business Server 2003

- Windows Small Business Server 2003 R2

- Windows Small Business Server 2008

For more information please see:

http://technet.microsoft.com/en-us/library/bb404245.aspx

Thursday, November 25, 2010

New Password Stealer Found MD5: 6deb0bdb5fb07bcdb1205d6ddd6a4ec2

Today I stumbled across a new trojan/password stealer that installs itself through Sun Microsystems Java.

Users receive an email such as:

Amy Fibro commented on your photo.
To see the comment thread, follow the link below:
http://www.facebook.com/n/?photo.php&fbid=155175754523620&set=a.145049682202894.23363.100000935890817&mid=33283faG5af34842cf81G37f9cbG9
Thanks,
The Facebook Team

This email is not from facebook. If you look at the link on the email - it points to a different URL that contains the java application which installs the virus.



With a default install of Internet Explorer 8 with all latest security updates and patches up to 26/11/2010 and default security settings the worm was able to automatically install itself.

The worm adds itself to HKCU\Software\Microsoft\Windows\CurrentVersion\Run so it can automatically execute upon startup.

The worm also changes the internet explorer security settings by modifying a series of registry keys.

The following Registry Values were modified:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0]
1609 =
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1]
1406 =
1609 =
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2]
1609 =
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]
1406 =
1609 =
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4]
1406 =
1609 =


The worm is also capable of infecting executables.

The malware injects codes into the address space of the following processes to mask its presence:
taskhost.exe
taskeng.exe
wscntfy.exe
ctfmon.exe
rdpclip.exe
explorer.exe


If you do not run your PC as administrator the worm will not have permissions to infect beyond your user profile.

The worm collects FTP credentials (IP, port, username, and passwords) from the following FTP software:
•FlashFXP
•Total Commander
•ws_ftp
•FileZilla
•FAR/FAR2
•winscp
•FTP Commander
•CoreFTP
•SmartFTP

The worm also has a keylogger for logging all other password related activity such as bank accounts etc.

When installed the worm copied itself to:

%APPDATA%\<random letters%>\<random letters>.exe

For example for me it called itself niba.exe.



When the virus is running the description the virus gives itself in task manager is Windows Defender.

Running the virus through one of my favorite sites virscan.org we see that only some antivirus companies detect it and the ones that do only come back with a generic detection.



I will be submitting the virus sample to the other anti-virus companies to get this worm indexed ASAP.

How to Grab MD5 or SHA1 hash of files in Windows

To simply grab the MD5 or SHA1 hash of a file in windows use the Microsoft File Checksum Integrity Verifier (FCIV) Utility. Download this tool from here:

http://download.microsoft.com/download/c/f/4/cf454ae0-a4bb-4123-8333-a1b6737712f7/windows-kb841290-x86-enu.exe

Below are examples on how to use this tool:

Tuesday, November 23, 2010

How to Deploy Microsoft .NET Framework 4 with Group Policy with Startup Script

To deploy .NET Framework 4 to your network you must use a startup script. No longer can you push .NET Framework out via an MSI file as with earlier versions such as .NET Framework 1.1.

I wrote a script that your welcome to copy it to push the .NET framework to all x86 and x64 windows based PC's on your network.

Save the following as a ".bat" file.

setlocal

REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************

REM Enter the Product Name.
set ProductName=Microsoft .NET Framework 4 Client Profile

REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\kbomb.local\netlogon\software

REM Set LogLocation to a central directory to collect log files.
set LogLocation=C:\Windows\Logs

REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************

IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)

REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%"
if NOT %errorlevel%==1 (goto End)

REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
:ARP86
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%"
if %errorlevel%==1 (goto DeployOffice) else (goto End)

REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
start /wait %DeployServer%\dotNetFx40_Full_x86_x64.exe /passive
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End

Endlocal


Please modify the DeployServer path to fit your environment.

Copy the script into the startup script folder inside the group policy object. Make sure you use a startup script and not a logon script! Refer to the following screenshot:



My script is called frameworkinstall.bat

Link this group policy object to your computer accounts. When the workstations refresh there group policy they will automatically install .NET Framework v4 on next reboot.

Taken with my iPhone 4:



Note: If you do not want the user to see the progress of the installation, please change /passive to /q. This will result in the PC hanging at the "Running Startup Scripts" for a few minutes. I personally prefer to present the users with a progress bar!

Monday, November 22, 2010

Can a RODC be a GC?

Answer: Yes

One of the gotchas before an RODC will advertise as a GC in your domain is that domainprep needs to be run in each domain, regardless if there are Win2k8 DCs in the domain or not:

If the RODC will be a global catalog server, you must also run adprep /domainprep in all domains in the forest, regardless of whether the domain runs a Windows Server 2008 domain controller. When you run adprep /domainprep in all domains, the RODC can replicate global catalog data from all domains in the forest and then advertise as a global catalog server.

If you haven't looked at RODCs for your branch office deployments for the future now is a good time to do so. I think one of the best things coming for Win2k8 is the ability to run RODCs on Server Core, reducing the attack surface and patching requirements and only caching the passwords for the users needed in the branch site instead of all passwords for the domain.

What are inetOrgPerson objects?

What are inetOrgPerson objects?



Windows Server 2003 Active Directory includes a new object type (that is, object class), inetOrg-Person, which is identical to the user object type in practically every way. InetOrgPerson was defined in RFC 2798 to represent a standard network user, and many other directory services use it for this purpose. Therefore, inetOrgPerson was brought along to Active Directory so that it would be easier to interoperate with these other products or to migrate them to Active Directory.

Although inetOrgPerson should be identical to user, Microsoft recommends that you test it with your applications that would use Active Directory as an authentication method, and your other projected usage scenarios, before you actually start using inetOrgPerson objects.

If inetOrgPerson objects are not needed in your forest, you can modify the forest schema so that InetOrgPerson doesn't appear in the New context menu of the Users and Computers snap-in. You would need to change the defaultHidingValue property of the inetOrgPerson schema class definition to TRUE. This setting affects all administrators of the forest, unless they use some other tool to create objects.

Sunday, November 21, 2010

What is the Central Store with 2008 Group Policy?

ADMX Central Store is a centralized location of keeping new XML-based administrative template (ADMX) files. In a Windows Server 2008 network environment, the Group Policy Object Editor does not copy ADMX files to each edited group policy object (GPO). Instead, it uses ADMX Central Store in a domain controller. The ADMX Central Store is not created automatically.

When using GPMC on Windows Vista, 2008 or higher operating systems they automatically query the following location to see if a central store exists:

\\domain.local\sysvol\domain\policies\PolicyDefinitions

If you have not created this folder in your SYSVOL, GPMC will look at its local hard drive for:

%systemroot%\PolicyDefinitions

If you have custom ADMX templates in your domain you want to use the new Central Store so that all PC's and domain controllers use the central store when editing group policy objects.

When you create the central store make sure you copy all existing custom ADMX policies from your local computer (%systemroot%\PolicyDefinitions) to the central store!

I encourage you to watch the following video by John Baker, it explains the Central Store and group policy changes in more detail!

http://technet.microsoft.com/en-us/edge/screencast-how-to-configure-the-central-admx-store.aspx

You cannot change the location for the central store, it is hardcoded!

Saturday, November 20, 2010

Moving to DFS-R for SYSVOL

Windows Server 2008 and Windows Server 2008 R2 supports DFS-R for replicating the SYSVOL partition between domain controllers.

For this to work all domain controllers in a active directory domain need to be Windows Server 2008 or Windows Server 2008 R2 and the Domain Functional Level must be Windows Server 2008.

Every domain within a forest has its own SYSVOL directory structure that is replicated. As a result your Forest Functional Level does not need to be 2008... other domains in your forest can continue to use the legacy FRS.

If you create a new Active Directory Domain thats Windows Server 2008 domain functional level it will automatically use SYSVOL. However if you are migrating towards Windows Server 2008 DFL you will need to migrate the SYSVOL replication over to DFS-R. This migration process needs to be performed once you have raised the DFL to Windows Server 2008.

To understand the process of migrating to DFS-R for your SYSVOL directory please read the following blog posts by Mahesh Unnikrishnan, a Senior Program Manager at Microsoft. There are 5 parts to this how-to:

http://http://blogs.technet.com/b/filecab/archive/2008/02/08/sysvol-migration-series-part-1-introduction-to-the-sysvol-migration-process.aspx

http://blogs.technet.com/filecab/archive/2008/02/14/sysvol-migration-series-part-2-dfsrmig-exe-the-sysvol-migration-tool.aspx

http://blogs.technet.com/filecab/archive/2008/03/05/sysvol-migration-series-part-3-migrating-to-the-prepared-state.aspx

http://blogs.technet.com/filecab/archive/2008/03/17/sysvol-migration-series-part-4-migrating-to-the-redirected-state.aspx

http://blogs.technet.com/filecab/archive/2008/03/19/sysvol-migration-series-part-5-migrating-to-the-eliminated-state.aspx

Monday, November 1, 2010

Exchange 2003 - Services wouldnt start due to AD Issues

Today I had an issue escalated to me where the following Exchange 2003 services would not start due to problems speaking with Active Directory:
- Microsoft Exchange Information Store
- Microsoft Exchange MTA Stacks
- Microsoft Exchange System Attendant

While diagnosing this issue I had the following diagnostic logging turned to medium for all sub components of the following:
- MSExchangeDSAccess
- MSExchangeSRS
- MSExchangeSA

Diagnostic logging is turned on in the Exchange 2003 server properties under the diagnostic logging tab.



There were two problems causing this issue - I will go through how I fixed both of them.

Problem 1 - The Local DC was not listening on TCP 3268

After looking at the issue initially I found out that the domain controller in the same active directory site as Exchange 2003 server was not listening on TCP 3268 (Global Catalog). The server was marked as being a global catalog server. During this time the following errors were being generated.

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Date: 01/11/2010
Time: 4:03:31 PM
User: N/A
Computer: MELB-EXCH-31
Description:
The Microsoft Exchange Information Store service terminated with service-specific error 2147500037 (0x80004005).




Event Type: Error
Event Source: MSExchangeMTA
Event Category: Operating System
Event ID: 2248
Date: 01/11/2010
Time: 5:18:22 PM
User: N/A
Computer: MELB-EXCH-31
Description:
A fatal error occurred. Directory operation (ds_initialize) failed with problem RD Server. [MAIN BASE 1 1 %5] (16)




Event Type: Error
Event Source: MSExchangeIS
Event Category: General
Event ID: 1121
Date: 01/11/2010
Time: 6:14:38 PM
User: N/A
Computer: MELB-EXCH-31
Description:
Error 0xfaf connecting to the Microsoft Active Directory.




This last error lead me down the right track, "0xfaf". I found a handy forum post that lets you understand all the different codes in relation to the information store connecting to Active Directory:

- Error: 0x96e, Service: Microsoft Active Directory - This problem occurs because the domain controller and other Exchange-Server-dependent services do not start completely when Exchange 2007 tries to start. See 940845 for details.
- Error: 0x8004010f, Service: Microsoft Active Directory - This behavior may occur if the organization name that you select during setup contains the forward slash mark (/) character. See 329599 for more information on this problem.
- Error: 4015, Service: Microsoft Exchange Information Server Directory - The Directory service will not start if the system date is later than January 17, 2038. See 154595 for details about this problem.
- Error: 0x80004005, Service: Microsoft Exchange Server Directory - This behavior may occur because the information store database is not initializing properly. See 322315 to solve this problem.
- Error: 0x80004005, Service: Microsoft Active Directory - You may not be able to mount Exchange 2000 information store databases and this event is logged. See 314294 and 822579 for details.
- Error: 0xfb5, Service: Microsoft Exchange Server Directory - This issue can occur if the Information Store service has been configured to log on as a system account or to use the Local System account. See 288952 to solve this problem.
- Error: 0xfaf, Service: Microsoft Active Directory - This behavior can occur because you do not have a global catalog in the forest or the connection to the global catalog is lost. See 303186 and 823163 to find out how to fix this problem.
- Error: 0xfaf, Service: Microsoft Exchange Server Directory - This issue can occur if the server is renamed after Exchange Server installation; some values in the MSExchangeIS key contain the name of the test server. See 248124 to solve this problem.
- Error: 0xfaf, Service: Microsoft Active Directory - This behavior can occur because you do not have a global catalog in the forest or the connection to the global catalog is lost. See 303186 and 823163 to find out how to fix this problem.
- Error: 0xfaf, Service: Microsoft Exchange Server Directory - This issue can occur if the server is renamed after Exchange Server installation; some values in the MSExchangeIS key contain the name of the test server. See 248124 to solve this problem.


As per the post above - I went to Microsoft Knowledgebase article 823163:

http://support.microsoft.com/kb/823163

This article stated:

This issue may occur if one or both of the following conditions are true:
- There is no global catalog in the forest.
- There is a problem with the connection to the global catalog.


There was only a single domain controller in the same Active Directory site as the Exchange 2003 server. This domain controller was marked as being a global catalog server however performing a "netstat -ant" revealed that it was not listening on the global catalog port TCP 3268.

Initially I tried removing the global catalog role of the server rebooting, re-adding the global catalog role then rebooting again. This did not resolve the problem.

To resolve this problem I demoted the server from being a domain controller and re-promoted it. After re-promoting the DC it then came up as a global catalog server again. There were no errors in the event logs about not being a global catalog server.

Problem 2 - The Exchange 2003 Server could not find the Active Directory Site

After re-promoting the domain controller I ran into another problem, the Exchange 2003 server could not find which Active Directory Site it was in.

Exchange was producing the following error:

c007077f no site available

The following errors were experienced in the event logs:

Event Type: Error
Event Source: MSExchangeDSAccess
Event Category: Topology
Event ID: 2114
Date: 01/11/2010
Time: 9:55:46 PM
User: N/A
Computer: MELB-EXCH-31
Description:
Process MAD.EXE (PID=1936). Topology Discovery failed, error 0x80040952.




I ran NLTEST /DSGETSITE to see if windows server itself could find its active directory site. This command threw out the following error:

1919 0x77f ERROR_NO_SITENAME



The exchange server was speaking to random domain controllers in other Active Directory sites. I determined this by following this article:

http://clintboessen.blogspot.com/2010/05/how-to-find-out-which-domain-controller.html

All other workstations and servers in the same Active Directory site could determine its site location. The problem was isolated to the Exchange 2003 server. To resolve this problem I found a workaround with a registry key where I hard coded the Exchange 2003 server's Active Directory site.

HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters

"SiteName" as a String Value

Enter the active directory site name as it appears in AD Sites and Services.



Then restart the Netlogon service. After this the Exchange Server 2003 was behaving properly and the services were able to be started.