Exchange Geek's Weblog

I'm a Geek!

Archive for the ‘CAS’ Category

How to Move Exchange Server 2007 to New Hardware and Keep the Same Server Name

Posted by Milind Naphade on 09/02/2009

Moving Exchange Server 2003 to a new box without changing the name is already described in a Microsoft White Paper published on TechNet. Because in Exchange Server 2007 many things changed the procedures to move to a new hardware have also changed.


  1. Backup the mailbox database.edb and pubic database.edb as well as mail.que files. It is highly recommended to have a full backup of these files to prevent any future complications.
  2. Power down the current Exchange server

Backing up Exchange Server 2007 depends on what server role is being backed up. Below is a list of role specific data that needs to be protected before moving ahead. Procedure documented here applies to a single server installed all the server roles.

Configure New Hardware:

  1. Use ADUC console to reset the Exchange Sever machine account.
  2. If you already have a Windows Server box to box to be brought on the network, join it into the network, change its name to your Exchange Server 2007 existing computer name and join into the domain.
  3. Configure IP Address for the new machine so that it uses a static IP that matches the IP in the DNS host record for the old server.
  4. Run Exchange setup. Using Start -> Run specify the path to Exchange Server 2007 Setup launcher, add the /recoverserver and /donotrestart switches. The complete command should look like the following:

Drive:\Setup /m:recoverserver /donotrestart

Once setup completes.


  1. Move the mail.que database back into the queue folder (this folder should be empty): c:\program files\Microsoft\Exchange Server\TransportRoles\data\queue
  2. Move the mailbox database into the production folder (this folder should also be empty): c:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group
  3. Move the Public database into the production folder (this folder should also be empty): c:\Program Files\Microsoft\Exchange Server\Mailbox\Second Storage Group
  4. Open the Exchange Management Console – obtain properties of the two stores and select the option that “This database can be overwritten by a restore”.
  5. Start all Exchange services.


  1. Verify Send Connector configuration – you should have a * domain listed with a type = SMTP in order to send mail outbound.
  2. Verify Receive Connector configuration – In order to receive mail the connector needs to accept anonymous connections.
  3. If external SMTP domain is different than the internal domain you need to Verify the External SMTP Domain is added to the Accepted Domains list.


Enable the Anti-Spam Agents for the Hub Transport role. To do so:

  1. Open Exchange Management shell and navigate to the scripts directory: c:\program files\Microsoft\Exchange Server\Scripts. Issue following command: .\install-AntispamAgents.ps1
  2. Restart the Exchange Transport Service (MSExchangeTransport).
  3. In Exchange Management console verify that the SPAM Agents are enabled on the Anti-Spam tab. This will be Organization Configuration – Hub Transport – Anti-Spam.
  4. Verify internal and external mail flow.

External Links:

If you have different server roles installed on different hardware following should be a good read;

Posted in CAS, Exchange Server 2007, MBX, Transport | 4 Comments »

All day events that span two days across time zones in Outlook

Posted by Milind Naphade on 23/01/2009

This is just a small follow up note to the Microsoft KB 262451. Sometimes, even if you choose the time of the meeting manually you still see the calendar entry spanned across two days. Why would that happen if Microsoft has already addressed the issue. Is this a bug? No it is not. It is a simple logic of time zones and the way outlook handles the time zone information in your calendar. The following should explain you why does it happen?


There are two users in my exchange organization Kate and Robb. Kate resides in Central Time Zone (US) and Robb resides in Pacific Time Zone (US). Rob sends a meeting request to Kate and marks this meeting as an All Day Event. Rob can see it correctly framed within a single day not spanning across the days.


However, when Kate receives this meeting she sees it spanning across two days and it appears the same even after she accepts it.


Basically, this behavior occurs because of the way outlook handles the meeting requests. If you observe correctly Outlook provides you a time frame of 24 hours to book someone’s or your own calendar. From 12:00 AM to 11:30 PM. When a appointment or a meeting request is marked as an “All day Event” outlook automatically adds the start time of the meeting request as 12:00 AM depending upon the local or mailbox time zone configured for a particular mailbox. This is one of the reasons why Kate’s calendar shows this entry spanned across two days. As written earlier if Rob’s outlook marked the start time as 12:00 AM 28th Wed according to Pacific Time it turns into 2:00AM 28th Wed in Central Time where Kate resides. Yet, the meeting is to complete after 24 hours and hence it spans across two days till 2:00 AM next day.

In an another scenario if this would have been a half day event which would have started somewhat around 7:00 AM and ended near about 7:00 PM in Rob’s calendar it would have reflected the correct booking in Kate’s calendar because according to her client time zone settings the meeting would have started around 9:00 AM and would have ended by 9:00 PM.

Another case where a meeting starts 7:00 AM PST and ends at 11:59 PM which is again more than a half day event will reflect spanned across two days to any users having its outlook client configured in CST.

Posted in CAS, Exchange Server 2003, Exchange Server 2007, General, Mobility, Outlook | Comments Off on All day events that span two days across time zones in Outlook

Managing Mobile devices connecting your Exchange Server 2007

Posted by Milind Naphade on 18/12/2008

Recently, I came across many people asking a question in forums about a way to restrict windows mobile or ActiveSync supported mobile devices from being used with EAS in an Exchange Server 2007 environment. Several others have already posted many ways to restrict these types of mobile devices. One of the bests I came across is by Microsoft Exchange Team at this talk about many other ways to do it more efficiently. However, they do require some additional tools.Exchange Server 2007 does have a built in command which can used to restrict those devices you never wanted.  


Set-CASMailbox -Identity <Mailbox Alias> -ActiveSyncAllowedDeviceIDs: <DeviceID> 

You can have multiple devices enabled for the same mailbox by simply specifying each device id in quotes (“IVR100W”) and each separated by a comma. Keep in mind that these IDs are stored in the mailbox of the associated mailbox alias. 

Manage and Audit:

Get-CASMailbox -Identity <Mailbox alias> |FL 

Your manager may come to you some day and ask you about the list of approved devices on your Exchange Server mailboxes. Do not stumble at all, above command will give you the information about device IDs associated with the mailbox name you specify in place of <Mailbox Alias>. A drawback of running this command is that it shows everything related to the CAS role and which is stamped on the mailbox. According the an article which was shared to me by one my co workers this audit can be simply carried out by using the cmdlet Get-ActiveSyncDeviceStatistics –Mailbox:<Mailbox Alias> |FL DeviceID but it failed to show me the details I wanted. A little bit of work with Microsoft Excel and a correct filter like –OrganizationUnit should be good to get the desired reports.  


Remove-ActiveSyncDevice -Identity <MobileDeviceIDParameter> 

Well, nothing much to explain about this. The command is pretty simple and straight forward. IDs collected using the Get-CASMailbox –Identity command can be used as an input to this command if at all you find some of those IDs aren’t in use.

Posted in CAS, Exchange Server 2007, Mobility | Comments Off on Managing Mobile devices connecting your Exchange Server 2007