我有一个客户将一个业务部门转移到一个新的AD森林,Exchange org等。
我们正在使用Quest工具来迁移用户和邮箱。 但是,我必须build立新的基础设施以配合旧的基础设施。
在旧版本中,我们使用托pipe文件夹邮箱策略来限制(或允许)保留。 他们从Exchange 2007开始,从未升级到保留策略; 好吧。
因此,在旧环境中,当您使用2007服务器定义新的托pipe内容设置时,可以从MessageClass的下拉列表中select“电子邮件”。 这是一个显示名称; 实际的MessageClass值是这样的:
MessageClass:IPM.Note; IPM.Note.AS/400移动通知表单v1.0; IPM.Note.Delayed; IPM.Note.Exchange.ActiveSync.Report; IPM.Note.JournalReport.Msg; IPM.Note.JournalReport。 TNEF; IPM.Note.Microsoft.Missed.Voice; IPM.Note.Rules.OofTemplate.Microsoft; IPM.Note.Rules.ReplyTemplate.Microsoft; IPM.Note.Secure.Sign; IPM.NOTE.SMIME; IPM.Note的。 SMIME.MultipartSigned; IPM.Note.StorageQuotaWarning; IPM.Note.StorageQuotaWarning.Warning; IPM.Notification.Meeting.Forward; IPM.Outlook.Recall; IPM.Recall.Report.Success; IPM.Schedule.Meeting *;报告。 IPM.Note.NDR
如果我拿这个,并试图在新的环境中把它换成Ex2010的一个新cmdlet,那么这就是我所得到的
New-ManagedContentSettings -Name "Delete Messages older then 90 days" -FolderName "Entire Mailbox" -RetentionEnabled $True -AgeLimitForRetention 90 -TriggerForRetention WhenDelivered -RetentionAction DeleteAndAllowRecovery -MessageClass "IPM.Note","IPM.Note.AS/400MoveNotificationFormv1.0","IPM.Note.Delayed","IPM.Note.Exchange.ActiveSync.Report","IPM.Note.JournalReport.Msg","IPM.Note.JournalReport.Tnef","IPM.Note.Microsoft.Missed.Voice","IPM.Note.Rules.OofTemplate.Microsoft","IPM.Note.Rules.ReplyTemplate.Microsoft","IPM.Note.Secure.Sign","IPM.Note.SMIME","IPM.Note.SMIME.MultipartSigned","IPM.Note.StorageQuotaWarning","IPM.Note.StorageQuotaWarning.Warning","IPM.Notification.Meeting.Forward","IPM.Outlook.Recall","IPM.Recall.Report.Success","IPM.Schedule.Meeting.*","REPORT.IPM.Note.NDR" -whatif
Invoke-Command:无法将参数“MessageClass”绑定到目标。 例外设置“MessageClass”:“属性的长度太长,最大长度为255,提供的值长度为518。 在C:\ Users \ MFinnigan.sa \ AppData \ Roaming \ Microsoft \ Exchange \ RemotePowerShell \ pfexcas02.fve.ad.5ssl.com \ pfexcas02.fve.ad .5ssl.com.psm1:28204 char:29 + $ scriptCmd = {&<<<< $ script:InvokeCommand`+ CategoryInfo:WriteError:(:) [New-ManagedContentSettings],ParameterBindingException + FullyQualifiedErrorId:ParameterBindingFailed,Microsoft.Exchange.Management.SystemConfigurationTasks.NewManaged ContentSettings
所以,configuration对象可以存储所有的混乱,但我不能通过cmdlet适合它来创build对象。 可爱。
有任何想法吗?
哇。 答案既明智又丑陋。 我把这个讨厌的东西放在一个variables中,然后传递给这个cmdlet。 我不是盲目地抨击微软的人,我知道他们希望人们在4年前停止使用托pipe文件夹,但是到底什么是地狱。
这比我考虑的另一个解决scheme要好,那就是安装Ex2007pipe理工具(或者可能是一个Ex2007服务器),只是为了让GUI在2007 Exchangepipe理控制台中执行此操作。
$class = "IPM.Note;IPM.Note.AS/400 Move Notification Form v1.0;IPM.Note.Delayed;IPM.Note.Exchange.ActiveSync.Report;IPM.Note.JournalReport.Msg;IPM.Note.JournalReport.Tnef;IPM.Note.Microsoft.Missed.Voice;IPM.Note.Rules.OofTemplate.Microsoft;IPM.Note.Rules.ReplyTemplate.Microsoft;IPM.Note.Secure.Sign;IPM.Note.SMIME;IPM.Note.SMIME.MultipartSigned;IPM.Note.StorageQuotaWarning;IPM.Note.StorageQuotaWarning.Warning;IPM.Notification.Meeting.Forward;IPM.Outlook.Recall;IPM.Recall.Report.Success;IPM.Schedule.Meeting.*;REPORT.IPM.Note.NDR" New-ManagedContentSettings -Name "Delete Messages older then 90 days" -FolderName "Entire Mailbox" -RetentionEnabled $True -AgeLimitForRetention 90 -TriggerForRetention WhenDelivered -RetentionAction DeleteAndAllowRecovery -MessageClass $class
Mfinni将其放在一个variables中的工作可能是最好的方法,特别是如果有其他脚本/保留策略重用的话。 但是,如果只是减less长度,你应该也可以使用以下内容。
New-ManagedContentSettings -Name "Delete Messages older than 90 days" -FolderName "Entire Mailbox" -RententionEndabled $True -AgeLimitForRetention 90 -TriggerForRetention WhenDelivered -RetentionAction DeleteAndAllowRecovery -MessageClass "IPM.Note.*","IPM.Notification.Meeting.Forward","IPM.Outlook.Recall","IPM.Recall.Report.Success","IPM.Schedule.Meeting.*","REPORT.IPM.Note.NDR"