Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# [Exchange Management Shell] 起動
PS C:\Windows\system32> LaunchEMS
# アーカイブ用のデータベース作成
[PS] C:\Windows\system32> New-MailboxDatabase -Server rx-7 -Name "Archive Database 001" `
-EdbFilePath "C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Archive Database\Archive Database 001.edb" `
-LogFolderPath "C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Archive Database"
Name Server Recovery ReplicationType
---- ------ -------- ---------------
Archive Database 001 RX-7 False None
WARNING: Please restart the Microsoft Exchange Information Store service on server RX-7 after adding new mailbox databases.
# データベース マウント
[PS] C:\Windows\system32> Mount-Database "Archive Database 001"
[PS] C:\Windows\system32> Get-MailboxDatabase
Name Server Recovery ReplicationType
---- ------ -------- ---------------
Mailbox Database 1217118174 RX-7 False None
Archive Database 001 RX-7 False None
[PS] C:\Windows\system32> Restart-Service MSExchangeIS
WARNING: Waiting for service 'Microsoft Exchange Information Store (MSExchangeIS)' to start...
# 例として [Server World] ユーザーのインプレースアーカイブを有効にする
[PS] C:\Windows\system32> Enable-Mailbox "Server World" -Archive -ArchiveDatabase "Archive Database 001"
Name Alias ServerName ProhibitSendQuota
---- ----- ---------- -----------------
Server World Serverworld rx-7 4.5 GB (4,831,838,208 bytes)
[PS] C:\Windows\system32> Get-Mailbox "Server World" | Select Name,ArchiveDatabase
Name ArchiveDatabase
---- ---------------
Server World Archive Database 001
# アーカイブへの接続をテストする
[PS] C:\Windows\system32> Test-ArchiveConnectivity -UserSmtp serverworld@srv.world
RunspaceId : 453cac6d-80d5-4bb2-9cbb-a0570ce1e8ac
Identity : serverworld@srv.world
PrimaryMRMConfiguration :
PrimaryLastProcessedTime :
ArchiveDomain :
ArchiveDatabase : Archive Database 001
ArchiveMRMConfiguration :
ArchiveLastProcessedTime :
ComplianceConfiguration : ElcV2, ValidArchiveDatabase
ItemMRMProperties :
Result : Successfully logged on to the users Archive mailbox.
Error :
IsValid : True
ObjectState : New
# インプレースアーカイブ無効なユーザーを表示する
[PS] C:\Windows\system32> Get-Mailbox -Filter "Name -NotLike 'DiscoverySearchMailbox*' -AND ArchiveDatabase -Eq `$null" | Select Name,ArchiveDatabase
Name ArchiveDatabase
---- ---------------
Exchange Admin
Ubuntu Linux
CentOS Linux
Fedora Linux
RedHat Linux
Debian Linux
# インプレースアーカイブ無効なユーザーをまとめて有効にする場合は以下
[PS] C:\Windows\system32> Get-Mailbox -Filter "Name -NotLike 'DiscoverySearchMailbox*' -AND ArchiveDatabase -Eq `$null" | Enable-Mailbox -Archive -ArchiveDatabase "Archive Database 001"
[PS] C:\Windows\system32> Get-Mailbox -Filter "Name -NotLike 'DiscoverySearchMailbox*'" | Select Name,ArchiveDatabase
Name ArchiveDatabase
---- ---------------
Server World Archive Database 001
Exchange Admin Archive Database 001
Ubuntu Linux Archive Database 001
CentOS Linux Archive Database 001
Fedora Linux Archive Database 001
RedHat Linux Archive Database 001
Debian Linux Archive Database 001
# インプレースアーカイブを無効にする場合は以下
[PS] C:\Windows\system32> Disable-Mailbox "CentOS Linux" -Archive
Confirm
Are you sure you want to perform this action?
Disabling the archive for "CentOS Linux" will remove the archive for this user and mark it in the
database for removal.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): Y
|