我已从Office 365(Export-Clixml
)导出了我需要在新租户中导入的设置,但它会生成错误:
PS> [Byte[]]$Data = Get-Content -Path ".TransportRules.xml" -Encoding Byte -ReadCount 0
PS> Import-TransportRuleCollection -FileData $Data
There is no Unicode byte order mark. Cannot switch to Unicode.
+ CategoryInfo : InvalidData: (File Data:String) [Import-TransportRuleCollection], XmlException
+ FullyQualifiedErrorId : [Server=DB5PR06MB1096,RequestId=f7825e85-da68-4cf4-a9cc-f201ffcc53ce,TimeStamp=7/6/2015 6:45:11 PM]
[FailureCategory=Cmdlet-XmlException]
39E0CC0E,Microsoft.Exchange.MessagingPolicies.Rules.Tasks.ImportTransportRuleCollection
+ PSComputerName : outlook.office365.com
该文件正在使用编码utf-16,这可能会导致问题?