Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SBS 2003 - 2008 without migration... exchange restore question 1

Status
Not open for further replies.

guitarzan

Programmer
Apr 22, 2003
2,236
US
I have a client with an SBS 2003 network (just 10 users), and will be migrating to an SBS 2008 box. Since the amount of data / resources used with it is not huge, they are considering just starting from scratch with the SBS 2008 network, have even played around with the new server, and all should work out fine... except... is it possible to get the Exchange 2003 mailboxes into Exchange 2007 on the new SBS box?

(That is, without doing a full SBS 2003 - SBS 2008 migration. The client has had some issues with the old SBS box, and is concerned that for whatever reason, the migration may fail, leaving them without a working server)
 
You can use ExMerge to export the mailboxes. Then use PowerShell to import the mailboxes into Exchange 2007.

Note that users will not be able to Reply to old messages from internal recipients since the Exchange group will change.

Install the 32bit Exchange Management Tools on a workstation that has PowerShell 1.0 installed and Outlook installed. Make sure you install the Exchange service pack/rollup on the client as well so it matches your Exchange server or you will have problems.

532-929b-76e9c677e802&displaylang=en

You can then use PowerShell to import the PST files directly into Exchange.

The PowerShell command is a simple one:
Import-Mailbox -Identity <mailboxUser> -PSTFolderPath <PSTFileLocation>


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Thank you for that, Mark... I will try that out and see how it goes.
 
I think you will find it is a rather easy process. Good luck.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Hi Mark,

When I run Powertools, the command "import-mailbox" is unrecognized... Here's what I did so far:

My SBS 2008 box has Exchange 2007 SP1. On an XP workstation joined to the 2008 domain, I installed both Powertools 1.0 and Microsoft Exchange Server 2007 Management Tools (32-Bit) (E2K7SP1EN32.exe) from the link you provided.

When I installed the Management Tools, I selected "Step 4: Install Microsoft Exchange Server 2007 SP1", then in "Server Roles", I only checked "Management Tools". Got an error the first time because IIS wasn't installed, then I installed it and it worked.

However, when I run Powertools, the command "import-mailbox" is unrecognized. "The term 'import-mailbox' is not recognized as a cmdlet..." Google searches suggest that I dont have the tools installed but I do (I think). Any ideas? Am I doing something dumb? :)
 
When you say PowerTools do you mean PowerShell?

Sounds to me like you are running the regular PowerShell rather than the Exchange Management Shell.

From within your start menu you should see the Exchange tools and in that folder the Exchange Management Shell.

If you wish to use the regular PowerShell you can but you will need to load the exchange snapin. To do that first issue the command:

add-pssnapin *.exchange*

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Yea I meant to say PowerShell, not PowerTools...
And yes, that's exactly what I was doing... and of course it works fine when I run the "Exchange Management Shell"!! Knew it was something dumb :) Thanks!
 
Happy to assist.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Mark mentioned a problem you will run into: "Note that users will not be able to Reply to old messages from internal recipients since the Exchange group will change."

Mark and I both know how to resolve that, and if you were willing to load ADSIEdit on the new server and do a little tweaking, it would be pretty simple to resolve that issue too.

You'd basically figure out what X500 address maps to your old server Admin Group (you can find this by looking at any old internal email header) and plug that into a ProxyAddresses field for each user via ADSIEdit. The value might be something like this:

X500:/o=YourDomain/OU=First Administrative Group/CN=Recipients/CN=BSmith

If you want to do this, check with us on what you are thinking of populating that field with to make sure it will work.

Dave Shackelford
ThirdTier.net
 
ShackDaddy, thanks for that... once I get the import straightened out I think I will attempt what you suggested.

Mark, everything went great except, for one thing; I was able to import the boxes as you directed, but no messages show up in Outlook 2003 unless I uncheck "Use cached mode". (Works fine in OWA and without cached mode). With cached mode enabled, the folders are all there, but empty, and I get "This folder has not yet been updated" in the lower-right. And I get synch errors as shown below. Any idea as to the cause?

16:47:26 Synchronizing Hierarchy
16:47:26 2 folder(s) updated in online store
16:47:26 Terminated in error
16:47:26 [80040107-30090701-0-610]
16:47:26 Microsoft Office Outlook Offline Folders
16:47:26 For more information on this failure, click the URL below:
16:47:26
 
I've not seen that error before, however you likely just need to give sufficient time for the sync to take place. It can take a while for cached mode to copy the emails down.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Going off one post I found in a google search, running "Outlook.exe /resetfolders" seemed to fix the problem!
 
Excellent, glad you got it working and thanks for sharing your final resolution.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Mark/Dave,

Thanks for the help so far. Turns out I am going to need to resolve the issue where you cant reply to older emails sent to internal recipients...

Dave mentioned figuring out the X500 address maps by looking at any old internal email header. How can I view the headers? Outlook doesn't show anything for internal mail, only external mail. I'm probably just looking in the wrong place, though...
 
Do you still have the old server available? You can grab the x500 string from there from any user. You just need the information from one user and I can assist by writing a script to update them all.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Yes, its X400 on the old server:

To be complete, this is what it shows in the "Email Addresses" tab in each user's properties:
Code:
smtp  [ignore]emailaddress@DOMAINNAME.local[/ignore]
[b]SMTP  [ignore]emailaddress@abccorp.com[/ignore][/b]
smtp  [ignore]emailaddress@mail2.abccorp.com[/ignore]
[b]X400  c=US;a= ;p=DOMAINNAME;o=Exchange;s=Lastname;g=Firstname;[/b]
 
For a migration from a standard SBS 2003 installation, it should look like this:

x500:/o=first organization/ou=first administrative group/cn=Recipients/cn=Username

I usually use a tool called ADModify to make these changes, but having a smart guy like Mark write a script for you makes it even easier.

Dave Shackelford
ThirdTier.net
 
Thanks for the vote of confidence ShackDaddy. :)

Can you recommend an easy place to grab that path with ADSIEdit on the old server? I don't currently have access to a server to check for it.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Below is the code I would use to do this. You need to edit the x500Base line with the data for your domain though.

Code:
'==========================================================================
'
' NAME: FixX500.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE  : 7/16/2009
' COPYRIGHT © 2009, All Rights Reserved
'
' COMMENT: Add an X500 address to a user account to ensure user can
'          reply to old mail after being moved to a new Exchange group.
'
'    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED To
'    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'    PARTICULAR PURPOSE.
'
'    IN NO EVENT SHALL THE SPIDER'S PARLOR AND/OR ITS RESPECTIVE SUPPLIERS 
'    BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
'    DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
'    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
'    ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
'    OF THIS CODE OR INFORMATION.
'
'==========================================================================

On Error Resume Next

Dim qQuery, objConnection, objCommand, objRecordSet
Dim oRootDSE, strDomain, objUser
Const ADS_PROPERTY_APPEND = 3

x500Base = "/o=ExampleAB/ou=Organizationalunit1/cn=Recipients/cn="

Set oRootDSE = GetObject("LDAP://rootDSE")
strDomain = oRootDSE.get("defaultNamingContext")

' other categories = computer, user, printqueue, group
qQuery = "<LDAP://" & strDomain &">;" & _
		"(objectCategory=person)" & _
       ";sAMAccountName,distinguishedName;subtree"

'Perform our query of AD for user objects
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Open "Provider=ADsDSOObject;"
objCommand.ActiveConnection = objConnection
objCommand.CommandText = qQuery
Set objRecordSet = objCommand.Execute

While Not objRecordSet.EOF
    'Bind to the user object
    Set objUser = GetObject("LDAP://" & objRecordSet.Fields("distinguishedName"))
	'Add the X500 Address
	objUser.PutEx ADS_PROPERTY_APPEND, "proxyAddresses", Array("X500:" & x500Base & objRecordSet.Fields("sAMAccountName"))
	objUser.SetInfo
    objrecordset.MoveNext
Wend

objConnection.Close

If you have a workstation that was connected to the old domain then it looks like you could grab the X500 path from the registry at:

HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\ProfileName\13dbb0c8aa05101a9bb000aa002fc45a\001e6603

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Checked 2 wkstns on 2003 domain, that registry key shows:
/o=xxxxx/ou=first administrative group/cn=Recipients/cn=yyyyy

where xxxxx is the domain name and yyyyy is the user's email address.

So i will use this line in the script:
Code:
x500Base = "/o=xxxxx/ou=first administrative group/cn=Recipients/cn="
Will play around with the script tomorrow and report my results. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top