症状
安装适用于 Microsoft Exchange Server 2019、2016 或 2013 的 2023 年 1 月或 2023 年 2 月安全更新,并启用 PowerShell 序列化有效负载的证书签名后,Exchange 工具箱和队列查看器不会启动。
此外,你还会收到错误 System.Reflection.TargetInvocationException 消息和以下 Unhandled Exception 错误消息:
Unhandled Exception in Managed Code Snap-inDeserialization fails due to one SerializationException: System.Runtime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 23-73-69-67-23-72-2A-00-00-00-01-00-00-00-FF-FF-FF ...at System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser input)Exception type: System.InvalidCastException
原因
如果启用了 PowerShell 序列化有效负载的证书签名功能,则托管代码管理单元不会反序列化 PowerShell 对象。
解决方法
此问题已在 2023 年 3 月 Exchange Server 安全更新中修复。 请按以下步骤操作:
- 安装 2023 年 3 月安全更新。
- 如果通过应用本文前面提供的解决方法 2 禁用了 PowerShell 序列化有效负载的证书签名功能,则可以按照“在 Exchange Server 中对 PowerShell 序列化有效负载进行证书签名”中的步骤重新打开该功能。