boyklg 发表于 2010-3-4 15:36:08

批量建立EX用户邮箱出错!怎么解决?

NewUsers.csv文件内容:

Name,UPN,OU,Password
Deepak Kumar,DKumar@exchangecn.com,exchangecn.com/Users,pass@word1
Ray Chow,RChow@exchangecn.com,exchangecn.com/Users,pass@word1
David Simpson,DSimpson@exchangecn.com,exchangecn.com/Users,pass@word1
Isabel Martins,IMartins@exchangecn.com,exchangecn.com/Users,pass@word1

在Exchange Management Shell 中输入以下命令:
$Template = Get-Mailbox "user"   ----user是已经存在的邮箱用户,说用这个当模版.

Import-CSV "C:\NewUsers.csv" | ForEach-Object -process {$Temp = ConvertTo-SecureString $_.Password -asPlainText -force;New-Mailbox -Name $_.Name -UserPrincipalName $_.UPN -OrganizationalUnit $_.OU -Database "Mailbox Database" -Password $Temp -TemplateInstance $Template}

下面是出错信息:

找不到接受实际参数“-TemplateInstance”的位置形式参数。
    + CategoryInfo          : InvalidArgument: (:) , ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-Mailbox
找不到接受实际参数“-TemplateInstance”的位置形式参数。
    + CategoryInfo          : InvalidArgument: (:) , ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-Mailbox
找不到接受实际参数“-TemplateInstance”的位置形式参数。
    + CategoryInfo          : InvalidArgument: (:) , ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-Mailbox
找不到接受实际参数“-TemplateInstance”的位置形式参数。
    + CategoryInfo          : InvalidArgument: (:) , ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-Mailbox

boyklg 发表于 2010-3-5 10:10:56

这个问题没人有知道吗??
还是没人出现过这种问题?
页: [1]
查看完整版本: 批量建立EX用户邮箱出错!怎么解决?