• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 829
  • Last Modified:

Exchange 2010

I have Exchange 2010 (MSG-OLD) with HUB+CAS+MBX roles all in one, which is working fine. I have added a new Exchange 2010 (MSG-NEW) & moved all roles including Mailboxes. However as a precondition for old Exchange server uninstall process, I need to move Public Folder to new server. But it comes out with an error which is mentioned below. Please help me to complete this task. Thanks in advance.

 [PS] C:\Windows\system32>.\MoveAllReplicas.ps1 -Server "msg-old" -NewServer "msg-new"
The term '.\MoveAllReplicas.ps1' is not recognized as the name of a cmdlet, function, script file, or operable pro
 Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:22
+ .\MoveAllReplicas.ps1 <<<<  -Server "msg-old" -NewServer "msg-new"
    + CategoryInfo          : ObjectNotFound: (.\MoveAllReplicas.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
0
ahmedh-masic
Asked:
ahmedh-masic
  • 6
  • 5
  • 2
  • +2
4 Solutions
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
If you want to run any script you have to navigate to the Scripts folder where the scripts reside in the Command Prompt.

Also hope you are running the command from Exchange Management Shell and not a normal command Prompt

http://www.theemailadmin.com/2010/05/8-useful-public-folder-management-scripts-in-exchange-server-2010/

- Rancy
0
 
davorinCommented:
[PS] C:\...  He is using EMS ;)

Rancy is right. Just adding:
Scripts folder is located at <Exchange Installation Path>\v14\ Server\Scripts
0
 
ahmedh-masicAuthor Commented:
As per the document i tried to "AddReplicaToPFRecursive" & then "RemoveReplicaFromPFRecursive" but received error with both, The errors are as follows...

C:\Windows\system32>AddReplicaToPFRecursive.ps1 -Server MSG02-OLD -TopPublicFolder \ -ServerToAdd MSG01-NEW
erm 'AddReplicaToPFRecursive.ps1' is not recognized as the name of a cmdlet, function, script file, or operable pr
. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
ne:1 char:28
ReplicaToPFRecursive.ps1 <<<<  -Server MSG02-OLD -TopPublicFolder \ -ServerToAdd MSG01-NEW
 CategoryInfo          : ObjectNotFound: (AddReplicaToPFRecursive.ps1:String) [], CommandNotFoundException
 FullyQualifiedErrorId : CommandNotFoundException

C:\Windows\system32>RemoveReplicaFromPFRecursive.ps1 -Server MSG01-NEW -TopPublicFolder \ -ServerToRemove MSG02-OLD
erm 'RemoveReplicaFromPFRecursive.ps1' is not recognized as the name of a cmdlet, function, script file, or operab
ogram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
ne:1 char:33
oveReplicaFromPFRecursive.ps1 <<<<  -Server MSG01-NEW -TopPublicFolder \ -ServerToRemove MSG02-OLD
 CategoryInfo          : ObjectNotFound: (RemoveReplicaFromPFRecursive.ps1:String) [], CommandNotFoundException
 FullyQualifiedErrorId : CommandNotFoundException
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
davorinCommented:
You are running scripts from C:\Windows\system32.
You need to run them from scrips folder.

Run exchange management shell. Change directory to:
c:\program files\microsoft\exchange server\v14\server\scripts
(if you have installed exchange server at default path)
and run the scripts again, but do not forget to start with .\ before the script name

like .\RemoveReplicaFromPFRecursive.ps ....
0
 
johan_vCommented:
Or instead of browsing to the path by cd 'ing to it just type cd $exscripts this brings you directly to it
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Your running the shell from C:\Windows\system32 can you please direct the shell to the scripts folder and then run the command.

Please use Exchange Management Shell or else it wont work :(

- Rancy
0
 
ahmedh-masicAuthor Commented:
Alhamdulillah I have removed public folder successfully, there is another error with database removal. The details are as follows....

Summary: 4 item(s). 3 succeeded, 1 failed.
Elapsed time: 00:00:21


Configuring Prerequisites
Completed

Elapsed Time: 00:00:00


Mailbox Role Prerequisites
Failed

Error:
Uninstall cannot continue. Database 'Mailbox Database': This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database <Database ID>. To get a list of all mailbox plans in this database, run the command Get-MailboxPlan. To get a list of archive mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Archive. To get a list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Arbitration. To disable a non-arbitration mailbox so that you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID>. To disable an archive mailbox so you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID> -Archive. Arbitration mailboxes should be moved to another server; to do this, run the command New-MoveRequest <parameters>. If this is the last server in the organization, run the command Disable-Mailbox <Mailbox ID> -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox. Mailbox plans should be moved to another server; to do this, run the command Set-MailboxPlan <MailboxPlan ID> -Database <Database ID>.
Click here for help... http://go.microsoft.com/fwlink/?linkid=30939&l=en&v=ExBPA.14&id=4a96fd69-9cec-4a48-9571-5c9e8ab3cfe9

Elapsed Time: 00:00:15


Client Access Role Prerequisites
Completed

Elapsed Time: 00:00:03


Hub Transport Role Prerequisites
Completed

Elapsed Time: 00:00:03
Exchange-2010-Uninstall-error1.jpg
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Get-Mailbox -Arbitration | FL

then you can Disable once you have the details.

- Rancy
0
 
ahmedh-masicAuthor Commented:
When i ran "Get-Mailbox -Arbitration their i found " Two SystemMailboxs & one FedaratedEmail" Which are already on the new server but still when i want to remove the old database from old server it gives the same error as before i mentioned.
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
So you have 2 Exchange servers .... try checking which Arbitration Mailbox is on the Old server and then Disable it.

Also run the below command and let me know the Output
Get-Mailbox -Database "DatabaseName"


Secondly if you simply want to remove the database and uninstall the role we can do this from ADSIEDIT.

- Rancy
0
 
ahmedh-masicAuthor Commented:
I found...while running "Get-Mailbox -Database "Mailbox Database" Do i have to move or remove this. If so plz let me know the best way?

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database"

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
DiscoverySearchMailbox... DiscoverySearchMa... msg02          50 GB (53,687,091,200 bytes)
0
 
johan_vCommented:
I would recommendto move it using the new-moverequest cmdlet. Just run the cmdlet get-mailbox -database "database name"|new-moverequest -targetdatabase targetdbname

Johan
0
 
AmitIT ArchitectCommented:
Make sure to also remove RG connectors created by default, else you might get error while removing HUB role.
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
ahmedh-masic: You can remove as well as this server is retiring so dont know why we would need it as the other server has its instance.

Hope you have taken care of other stuff like SendConnector and having everything pointing to new E2k10 server.
No worry about RGC as i dont think 2 E2k10 servers need RGC between them.

- Rancy
0
 
ahmedh-masicAuthor Commented:
Dear Rancy,

Thank you for your patience & understanding of my problem & being a guide for resolving it.
Thank you once again from the bottom of my heart.

Also like to thank Johan for his cmdlet "get-mailbox -database" which moved the remaining things.

I have successfully decommission the old Exchange 2010 & the new server is working fine.
Thanks everyone for their tips.
0
 
ahmedh-masicAuthor Commented:
Thanks everyone.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 6
  • 5
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now