2013年8月31日 星期六

Exchange 有公用資料夾移動到另一部伺服器的公用資料夾資料庫 ReplaceReplicaOnPFRecursive.ps1


.\AddReplicaToPFRecursive.ps1 -server "CCH-MAIL11" -TopPublicFolder "\" -ServerToAdd "CCH-MAIL16"
.\AddReplicaToPFRecursive.ps1 -server "CCH-MAIL13" -TopPublicFolder "\NON_IPM_SUBTREE" -ServerToAdd "CCH-MAIL15"

幹REMOVE時 -TopPublicFolder \ 不用""包
.\RemoveReplicaToPFRecursive.ps1 -server "CCH-MAIL15" -TopPublicFolder \ -ServerToRemove "CCH-MAIL11"



AddReplicaToPFRecursive.ps1
                [-Server <ServerIdParameter>]
                [-TopPublicFolder <PublicFolderIdParameter>]
                [-ServerToAdd <ServerIdParameter>]
PARAMETERS:
        -Server (optional)
                The server to operate against. Must be an Exchange 2007 Mailbox server
                with a public folder database. Defaults to a convenient server.
        -TopPublicFolder (required)
                The folder identity of the top of the tree of folders to modify
        -ServerToAdd (required)
                The server identity to add to the replica list. Must be a server with a
                public folder database.
        -------------------------- EXAMPLE 1 --------------------------
C:\PS> .\AddReplicaToPFRecursive.ps1 -TopPublicFolder "\Folder" -ServerToAdd "MyEx2003Server"
        -------------------------- EXAMPLE 2 --------------------------
C:\PS> .\AddReplicaToPFRecursive.ps1 -Server "MyEx2007Server" -TopPublicFolder "\Folder" -ServerToAdd "MyEx2003Server"



.\AddReplicaToPFRecursive.ps1 -TopPublicFolder "\NON_IPM_Subtree" -ServerToAdd "CCH-MAIL16"

2013年8月29日 星期四

Exchange 仲裁信箱 Arbitration Mailbox


Get-Mailbox -Database <Database ID> -Arbitration

New-MoveRequest -Identity "SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}" -TargetDatabase "17E"
New-MoveRequest -Identity "SystemMailbox{1f05a927-58e1-439d-ac15-f69c0d044383}" -TargetDatabase "17E"
New-MoveRequest -Identity "FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042" -TargetDatabase "17E"
get-mailbox -Identity "FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042" | fd -wrap
FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042




1. Find the Arbitration Mailbox using the Exchange MAnagement Shell (EMS):
Get-Mailbox -Arbitration | Where {$_.Name -like "SystemMailbox*" } | ft –wrap

2. Now create a new move request in order to move the system mailboxes to another mailbox database:
New-MoveRequest -Identity "SystemMailbox{1f05a927-32d1-4e19-8ea5-67eba859f541-yourGUID}" -TargetDatabase "dbxxxx"

3. Verify whether the move request completed:
Get-MoveRequest

4. Now remove the move request
Remove-MoveRequest -Identity "the name of the request like Microsoft Exchange Approval Assistant"

Exchange determine the Microsoft Exchange version



Get-ExchangeServer | Format-Table Name, *Version*



Microsoft Exchange 2010

To determine the Rollup that has been applied to Microsoft Exchange 2010, run the following command in the Exchange Management Shell:

GCM exsetup |%{$_.Fileversioninfo}

To determine the Microsoft Exchange version for all Microsoft Exchange Servers in the organisation:

Get-ExchangeServer | Format-Table Name, *Version*

Exchange 無法在移動後清理來源信箱.

此方法無效


警告: 無法在移動後清理來源信箱.
錯誤詳細資料: MapiExceptionUnexpectedMailboxState: Unable to delete mailbox. (hr=0x80004005, ec=2634)



To Speed up the move request:
On ALL CAS Servers
Edit C:\Program Files\Microsoft\Exchange Server\V14\Bin\MSExchangeMailboxReplication.exe.config
--Find the following counter: “maxCleanupRetries”
--The default value is 5. Change to 1.
Restart MSExchangeMailboxReplication Service

To Clean up a Soft Deleted Mailbox on a database:
Get-MailboxStatistics -Database <MAILBOXDATABASE> | Where { $_.DisconnectReason -eq "SoftDeleted" } | Format-List LegacyDN, DisplayName, MailboxGUID, DisconnectReason
Remove-StoreMailbox -Database <MAILBOXDATABASE> -Identity <MAILBOXGUID> -MailboxState Softdeleted

To Clean up all Soft Deleted Mailboxes on a database:
Get-MailboxStatistics -Database <MAILBOXDATABASE> | Where-Object {$_.DisconnectReason -eq “Softdeleted”} | ForEach {Remove-StoreMailbox -Database $_.database -identity $_.mailboxguid -MailboxState Softdeleted}


Remove-StoreMailbox -Database db_name -Identity "User name" -MailboxState Softdeleted

Exchange Create a Mailbox Repair Request






FIX ALL
New-MailboxRepairRequest -Mailbox 9000 -CorruptionType SearchFolder,AggregateCounts,ProvisionedFolder,FolderView


New-MailboxRepairRequest -Mailbox tony@contoso.com -CorruptionType FolderView


Get-Mailbox -Filter {CustomAttribute2 -like "Repair Required"} | New-MailboxRepairRequest -CorruptionType SearchFolder,AggregateCounts,ProvisionedFolder,FolderView


New-MailboxRepairRequest -Mailbox ayla -CorruptionType ProvisionedFolder,SearchFolder -DetectOnly


New-MailboxRepairRequest -Mailbox ayla -CorruptionType ProvisionedFolder,SearchFolder -DetectOnly


New-MailboxRepairRequest -Database MBX-DB01 -CorruptionType AggregateCounts

2013年8月27日 星期二

Exchange Remove-DatabaseAvailabilityGroupServer Uninstall Exchange2010



Remove-DatabaseAvailabilityGroupServer

摘要: 1 個項目。1 個成功,0 個失敗。
經過時間: 00:01:43

CCH-MAIL19
已完成
警告:
Active Manager 作業失敗。錯誤 嘗試叢集作業時發生錯誤。錯誤: 收回節點 'cch-mail19' 已返回,但並未完全清除該節點。請執行 cluster.exe node <NodeName> /forcecleanup 以完成清除此節點的作業。。
已完成的 Exchange 管理命令介面命令:
Remove-DatabaseAvailabilityGroupServer -MailboxServer 'CCH-MAIL19' -Identity 'DAG16'
經過時間: 00:01:43

Uninstall Exchange2010

摘要: 2 個項目。1 個成功,1 個失敗。
經過時間: 00:00:10

正在設定必要條件
已完成
經過時間: 00:00:00

信箱角色 必要條件
失敗
錯誤:
此電腦是叢集成員,必須先使用 Remove-DatabaseAvailabilityGroupServer 工作將它從資料庫可用性群組移除,才能解除安裝 Exchange。
按一下這裡以取得說明... http://go.microsoft.com/fwlink/?linkid=30939&l=zh-Hant&v=ExBPA.14&id=22cdcab6-17f3-435a-a3a9-ec7dcb636608
經過時間: 00:00:10


cluster.exe node <NodeName> /forcecleanup 這個在Server2012上打到死都不能RUN

要用POWERSHELL http://technet.microsoft.com/zh-tw/library/ee619744(v=ws.10).aspx


cluster node /forcecleanup Clear-ClusterNode
For more information, see: Clear-ClusterNode (http://go.microsoft.com/fwlink/?LinkId=143781)