Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
[PS] C:\Users\exchangeadmin> LaunchEMS
# 既定のリテンションポリシー
[PS] C:\Users\exchangeadmin> Get-RetentionPolicy
Name RetentionPolicyTagLinks Guid
---- ----------------------- ----
Default MRM Policy {Recoverable Items 14 days move to c4ca90d1-b613-4294-a344-a12df088254
archive, Never Delete, 5 Year 5
Delete, 1 Year Delete, 6 Month
Delete, 1 Month Delete, 1 Week
Delete, Personal never move to
archive, Personal 5 year move to
archive, Default 2 year move to
archive, Personal 1 year move to
archive}
ArbitrationMailbox {Never Delete, 29e4e2b5-4852-4df1-ae09-366f3e053bc
AsyncOperationNotification, 4
ModeratedRecipients, AutoGroup}
# 既定のリテンションポリシータグ
[PS] C:\Users\exchangeadmin> Get-RetentionPolicyTag | Format-Table -AutoSize -Wrap
Name Type Description
---- ---- -----------
Personal 1 year move to archive Personal Managed Content Settings
Default 2 year move to archive All Managed Content Settings
Personal 5 year move to archive Personal Managed Content Settings
Personal never move to archive Personal Managed Content Settings
1 Week Delete Personal Managed Content Settings
1 Month Delete Personal Managed Content Settings
6 Month Delete Personal Managed Content Settings
1 Year Delete Personal Managed Content Settings
5 Year Delete Personal Managed Content Settings
Never Delete Personal Managed Content Settings
Recoverable Items 14 days move to archive RecoverableItems Managed Content Settings
# 既定では リテンションポリシーは適用されないが
# インプレースアーカイブを有効にしたユーザーには 既定のリテンションポリシーが自動的に適用される
[PS] C:\Users\exchangeadmin> Get-Mailbox "Debian" | Select Name,ArchiveDatabase,RetentionPolicy
Name ArchiveDatabase RetentionPolicy
---- --------------- ---------------
Debian
[PS] C:\Users\exchangeadmin> Get-Mailbox "Serverworld" | Select Name,ArchiveDatabase,RetentionPolicy
Name ArchiveDatabase RetentionPolicy
---- --------------- ---------------
Server World Archive Database 001 Default MRM Policy
# リテンションポリシーを新規作成して適用する場合は以下
# リテンションポリシータグ新規作成
# * 各パラメーターの意味は [Get-Help New-RetentionPolicyTag -Full] 参照
[PS] C:\Users\exchangeadmin> New-RetentionPolicyTag -Name "2 Year Delete" -Type All -AgeLimitForRetention 730 -RetentionAction DeleteAndAllowRecovery
[PS] C:\Users\exchangeadmin> New-RetentionPolicyTag -Name "3 Month move to Archive" -Type All -AgeLimitForRetention 90 -RetentionAction MoveToArchive
# リテンションポリシーを新規作成して 作成済みのリテンションポリシータグをリンク
# * 各パラメーターの意味は [Get-Help New-RetentionPolicy -Full] 参照
# * 複数タグをリンクする場合はカンマ区切りで指定
[PS] C:\Users\exchangeadmin> New-RetentionPolicy "My Delete Policy" -RetentionPolicyTagLinks "2 Year Delete"
[PS] C:\Users\exchangeadmin> New-RetentionPolicy "My Archive Policy" -RetentionPolicyTagLinks "3 Month move to Archive"
[PS] C:\Users\exchangeadmin> Get-RetentionPolicy
Name RetentionPolicyTagLinks Guid
---- ----------------------- ----
Default MRM Policy {Recoverable Items 14 days move to c4ca90d1-b613-4294-a344-a12df088254
archive, Never Delete, 5 Year 5
Delete, 1 Year Delete, 6 Month
Delete, 1 Month Delete, 1 Week
Delete, Personal never move to
archive, Personal 5 year move to
archive, Default 2 year move to
archive, Personal 1 year move to
archive}
ArbitrationMailbox {Never Delete, 29e4e2b5-4852-4df1-ae09-366f3e053bc
AsyncOperationNotification, 4
ModeratedRecipients, AutoGroup}
My Delete Policy {2 Year Delete} 206df790-1fc5-4e1c-b72f-0cbc6cc3423
2
My Archive Policy {3 Month move to Archive} 79b92311-cc36-4d61-8a64-35be9e39657
9
[PS] C:\Users\exchangeadmin> Get-RetentionPolicyTag | Format-Table -AutoSize -Wrap
Name Type Description
---- ---- -----------
Personal 1 year move to archive Personal Managed Content Settings
Default 2 year move to archive All Managed Content Settings
Personal 5 year move to archive Personal Managed Content Settings
Personal never move to archive Personal Managed Content Settings
1 Week Delete Personal Managed Content Settings
1 Month Delete Personal Managed Content Settings
6 Month Delete Personal Managed Content Settings
1 Year Delete Personal Managed Content Settings
5 Year Delete Personal Managed Content Settings
Never Delete Personal Managed Content Settings
Recoverable Items 14 days move to archive RecoverableItems Managed Content Settings
2 Year Delete All Managed Content Settings
3 Month move to Archive All Managed Content Settings
# リテンションポリシーを設定したい各ユーザーにポリシーを設定
[PS] C:\Users\exchangeadmin> Set-Mailbox "Serverworld" -RetentionPolicy "My Delete Policy"
[PS] C:\Users\exchangeadmin> Start-ManagedFolderAssistant -Identity "Serverworld"
[PS] C:\Users\exchangeadmin> Set-Mailbox "Fedora" -RetentionPolicy "My Archive Policy"
[PS] C:\Users\exchangeadmin> Start-ManagedFolderAssistant -Identity "Fedora"
[PS] C:\Users\exchangeadmin> Get-Mailbox -Filter "Name -NotLike 'DiscoverySearchMailbox*'" | Select Name,ArchiveDatabase,RetentionPolicy
Name ArchiveDatabase RetentionPolicy
---- --------------- ---------------
Server World Archive Database 001 My Delete Policy
Exchange Admin Archive Database 001 Default MRM Policy
Red Hat
Debian
Fedora Linux Archive Database 001 My Archive Policy
Rocky Linux Default MRM Policy
|