将多个邮箱添加到一个用户时,无法对参数“ Identity”错误进行参数转换

时间:2019-09-04 08:30:26

标签: powershell exchange-server

我正在尝试从MS Exchange Powershell模块中的CSV文件添加多个邮箱,但是我收到以下错误:

Cannot process argument transformation on parameter 'Identity'. Cannot 
convert value "@{identity=sharedmailbox@mail.com}" to type
"Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter".
Error: "Cannot convert the "@{identity=sharedmailbox@mail.com}" value of
type "Deserialized.System.Management.Automation.PSCustomObject" to type
"Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter"."
    + CategoryInfo          : InvalidData: (:) [Add-MailboxPermission], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Add-MailboxPermission
    + PSComputerName        : outlook.office365.com

在下面您可以看到脚本:

SELECT V.X.value('(RequestCessationYes/@value)[1]','varchar(5)') AS [value]
FROM (VALUES(CAST('<RequestCessationYes value="false" />' AS xml)))V(X);

0 个答案:

没有答案