Exchange 2007

Exchange 2007: How to export mailbox with management shell?

image After releasing Exchange Server Service Pack 1 (SP1) Microsoft added new functionality called Export-Mailbox cmdlet for Exchange Management Shell.

The Export-Mailbox cmdlet exports all message types, including messages, calendar items, contacts, distribution lists, journal entries, tasks, notes, and documents. However, the Export-Mailbox cmdlet does not export rules.

To export data from a .pst file, you must run the Export-Mailbox cmdlet from a 32-bit computer that has the 32-bit version of the Exchange management tools and Outlook 2003 Service Pack 2 (SP2) or Outlook 2007 installed.

Well all prerequisites were in place; I opened the Exchange Management Shell and run the following command line:

[PS] C:\Documents and Settings\admin>Export-Mailbox -identity user1 -PSTFolderPath c:\user1.pst

Confirm
Are you sure you want to perform this action?
Exporting mailbox content from the mailbox ‘Gaag, van der Rob’ into .pst file ‘c:\gaagr.pst’. This operation may take a long time to
complete.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
Export-Mailbox : Error was found for User1 (user1(at)networknet.nl) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error:
MAPI or an unspecified service provider.
ID no: 00000000-0000-00000000, error code: -1056749164
At line:1 char:15
+ Export-Mailbox <<<<  -identity user1 -PSTFolderPath c:\user1.pst
    + CategoryInfo          : InvalidOperation: (0:Int32) [Export-Mailbox], RecipientTaskException
    + FullyQualifiedErrorId : DFCFF30D,Microsoft.Exchange.Management.RecipientTasks.ExportMailbox

The export failed. After reading some posts on Google I found the solution myself. I tried to export my own mailbox which worked fine so the problem has to be within the permissions set. To get full access run the Add-MailboxPermissions cmdlet.

Add-MailboxPermission -identity user1 -Accessrights FULLACCESS -User admin 
Export-Mailbox -identity user1 -PSTFolderPath c:\user1.pst 

With these steps I can develop a procedure to backup mailboxes when they are removed from the system.

Exchange 2007: unexpected error with management shell

image  I received the following error message when opening and running a cmdlet with my Exchange Management Shell:

 

 

[PS] C:\Documents and Settings\admin>Export-Mailbox -identity user1 -PSTFolderPath c:\user1.pst
WARNING: An unexpected error has occurred and debug information is being generated: Unable to determine the installed file version
from the registry key ‘Software\Microsoft\Exchange\Setup’.

Export-Mailbox : Unable to determine the installed file version from the registry key ‘Software\Microsoft\Exchange\Setup’.
At line:1 char:15
+ Export-Mailbox <<<<  -identity user1 -PSTFolderPath c:\user1.pst
    + CategoryInfo          : NotSpecified: (:) [Export-Mailbox], TaskException
    + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.Tasks.TaskException,Microsoft.Exchange.Management.RecipientTasks.ExportMailbox

Just looking on the error message it seems that something was missing in the Windows Registry. I opened Registry Editor and browsed to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange. The Setup key was missing. Exchange 2007 management tools were installed to another server than Exchange Server was installed. I logged on the Exchange 2007 server, opened Registry Editor and browsed to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange key.  The Setup folder was visible and I right-clicked on the Setup folder and exported the Setup branch.

I went back to my Exchange 2007 Management installed server and imported the reg file.

image

After importing the reg file my problem was solved and I had another challenge with Export-Mailbox cmdlet.

Exchange 2007: Server up but no new email

image No new emails were delivered for my Networknet.nl domain. Second configured MX record received new emails for my personal email address. I logged on the Exchange 2007 server but at first glance I could not see any issues. I opened Internet Explorer and browsed to http://centralops.net/co/EmailDossier.aspx.

 

Email Dossier from Centralops.net

Allows you to validate and investigate email addresses.

SMTP session

[Contacting mx1.networknet.nl ...]
[Connected]
220 w2k8.Networknet.nl Microsoft ESMTP MAIL Service ready at Wed, 30 Dec 2009 17:41:56 +0100
EHLO hexillion.com
250-w2k8.Networknet.nl Hello [70.84.211.98]
250-SIZE 10485760
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-AUTH
250-8BITMIME
250-BINARYMIME
250 CHUNKING
MAIL FROM:<HexValidEmail@hexillion.com>
452 4.3.1 Insufficient system resources
MAIL FROM:<>
452 4.3.1 Insufficient system resources
[Unfavorable reply code, cannot continue]
RSET
[Contacting mx2.networknet.nl ...]
[Connected]

Message 452 4.3.1 Insufficient system resources was shown during the SMTP session. I went back to the Exchange 2007 server and saw that I only had 700mb free on my C:\ volume. I opened Server Manager and checked Applications eventviewer and than I filtered for Error events. The result showed following error evenid 15006:

Log Name: Application

Source: MSExchangeTransport

Date: 12/30/2009 5:50:22 PM

Event ID: 15006

Task Category: ResourceManager

Level: Error

Keywords: Classic

User: N/A

Computer:w2k8

Description:

The Microsoft Exchange Transport service is rejecting message submissions because the available disk space has dropped below the configured threshold.

Resource utilization of the following resources exceed the normal level:

Queue database and disk space ("C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue\mail.que") = 97% [Medium] [Normal=94% Medium=96% High=98%]

Queue database logging disk space ("C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue\") = 97% [Medium] [Normal=94% Medium=96% High=98%]

No components were disabled because of back pressure.

The following resources are in the normal state:

Version buckets = 0 [Normal] [Normal=80 Medium=120 High=200]

Private bytes = 0% [Normal] [Normal=71% Medium=73% High=75%]

Physical memory load = 81% [limit is 94% before message dehydration occurs.]

So my free diskspace was low and the Microsoft Exchange Transport service stopped. I run the Windows Backup utility to backup my Exchange 2007 server and truncate the exchange log. This Exchange 2007 environment is hosted in a lab and no scheduled backup jobs are yet set. Something I should do quickly.

Exchange 2007: Services fail to start

If you are running a Windows Server 2008 virtual machine with “AD DS” Services (Domain Controller) and you installed Exchange 2007 SP1 on the same machine than three services may fail to start. During the boot process of the virtual machine Active Directory Services are not ready and some Exchange 2007 services will fail to start.

Screenshot of the Services console during my troubleshooting actions.

phpLMRJYI

Microsoft Exchange Information Store, Microsoft Exchange Service Host and Microsoft Exchange System Attendant services are not started. The Startup Type of has been set to Automatic.

The System EventViewer will show the following error events:

  • EventID 7024: The Microsoft Exchange Information Store service terminated with service-specific error 0 (0×0).
  • EventID 7009: A timeout was reached (30000 milliseconds) while waiting for the Microsoft Exchange Service Host service to connect.
  • EventID 7000: The Microsoft Exchange Service Host service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
  • EventID 7022: The Microsoft Exchange Transport service hung on starting.

Exchange Management Console message:

  • ERROR: Could not connect to the Microsoft Exchange Information Store service on server Networknet.nl. One of the following problems may be occurring: 1- The Microsoft Exchange Information Store service is not running. 2- There is no network connectivity to server Networknet.nl. 3- You do not have sufficient permissions to perform this command. The following permissions are required to perform this command: Exchange View-Only Administrator and local administrators group for the target server. 4- Credentials have been cached for an unpriviledged user. Try removing the entry for this server from Stored User Names and Passwords.

To fix this problem change the Startup Type of Microsoft Exchange Information Store, Microsoft Exchange Service Host and Microsoft Exchange System Attendant to “Automatic (Delayed Start)”

phpzDcsBJ

 

Reboot the virtual machine again and everything should be started as smooth as you would have two separate virtual machines.

Related links:

SSL certificate Windows Server 2008 and Exchange 2007 SP1

Thanks to guys from Telnetport25 I was able to finish my SSL certificate migration for my new Windows Server 2008 virtual machine running a Exchange 2007 SP1 installation.

My work log:

  • Logon on the old Windows Server 2003 hosting the OWA front-end role
  • Start MMC and add the Certificate Snap-In; choose the Computer Account.
  • Go to Personal/Certificates and locate the SSL certificate assigned to IIS for SSL encryption. Right click ; All Tasks and choose export. Choose the appropriate options like the certificate path; assign password and save the PFX file to "My Documents"
  • Copy the PFX file to your Windows Server 2008 Client Access Server
  • Logon on the Windows Server 2008 and add the Certificate Snap-In to a new MMC console for the Computer Account
  • Go to Personal/Certificates; right click; All Tasks and choose Import.

image 

  • Locate the PFX file; enter the password and make sure you check "Mark this key as exportable" to enable future migrations of the SSL certificate.
  • Place the certificate in the Personal Store

image 

  • Open the certificate and go to Details tab. Locate the Thumprint field and select Value with mouse; press CRTL-C to copy the data.

image

  • Paste the value in Notepad and replace the "SPACE’ with CRTL-H. In the Find what field press space on the keyboard and click Replace All

image

  • Copy the Thumbprint
  • Start the Exchange Management Shell and run the Enable-ExchangeCertificate cmdlet
  • Type IIS as Services and paste the copied data from Notepad to Thumbprint

image 

  • Start Exchange Management Console and go to Server Configuration /  Client Access / Select the server and open owa from Outlook Web Access tab
  • Type External URL of the SSL certificate and DNS. E.g. https://webmail.domain.tlk

    image

  • Click OK and you are finished to test the configuration.
  • Start IE and test your OWA role. Review your NAT and Firewall rules also.

image

Related links:

Exchange 2007 SP1 upgrade Windows Server 2003 x64

After fixing my Active Directory I start the upgrade of my current Exchange 2007 server. As you will see from the screenshots below the installation is straight forward but the requirements are killing me with this service pack upgrade. First of all make sure  a) your Active Directory replication is working properly, b) Exchange 2007 server has been installed with Windows Server 2003 SP2 and c) Microsoft .NET Framework 2.0 Service Pack 1 has been installed. To complete these requirements as posted before I was forced to remove one of my domain controllers running in a virtual machine with dcpromo /forceremoval and metadata cleanup; this box did not replicate for three months.

 

2008-04-27_190104 2008-04-27_190112 2008-04-27_190225 2008-04-27_190230 2008-04-27_190333 2008-04-27_201601

 

You can also upgrade from command line. I used gui mode to illustrate the process.

Setup.com /mode:upgrade

 

Check the hyperlink at Technet for all updates within SP1 What’s New in Exchange Server 2007 SP1. I like to integration with Windows Server 2008 and Exchange 2007 Sp1, Exchange Management console updates and the OWA premium changes.