从 Powershell 添加新的 Exchange 2013 邮箱时出错

从 Powershell 添加新的 Exchange 2013 邮箱时出错

我正在尝试通过 Powershell 添加新邮箱,但出现以下错误:

#New-ADUser -Name AreallyTest -SamAccountName AreallyTest -AccountPassword (ConvertTo-SecureString Password1234 -AsPlainText -Force) -Enabled:$true -Company land -HomeDrive Z: -ChangePasswordAtLogon:$true -Path 'cn=DC01,DC=internal,DC=land,DC=edu'| Enable-Mailbox -Identity Novell\AreallyTest -Alias Novell\AreallyTest

New-ADUser : Directory object not found At line:1 char:1
+ New-ADUser -Name AreallyTest -SamAccountName AreallyTest -AccountPassword(Conve ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~    + CategoryInfo          : ObjectNotFound: (CN=AreallyTest,...=land,DC=edu:String) [New-ADUser], ADIdentityNotFoundException + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Microsoft.ActiveDirectory.Management.Commands.NewADUser

如果我尝试直接添加邮箱,就会出现此错误(它正在寻找 .internal)

#Enable-Mailbox -Identity Novell\AreallyTest -Alias AreallyTest

Enable-Mailbox : The operation couldn't be performed because object'Novell\AreallyTest' couldn't be found on 'DC01.internal.land.edu'.At line:1 char:1+ Enable-Mailbox -Identity Novell\AreallyTest -Alias AreallyTest+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo :NotSpecified: (:) [Enable-Mailbox], ManagementObjectNotFoundException  + FullyQualifiedErrorId : [Server=EXCH01,RequestId=cf8213cd-ea66-4b9a-97e1-fde49f78e5cb,TimeStamp=10/15/2014 8:59:14 PM] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 3B4E2313,Microsoft.Exchange.Management.Rec ipientTasks.EnableMailbox

我很确定错误是由于我在创建用户时没有添加 .internal 造成的,但我不确定如何初始化该字段。(也可能是别的原因)

如何在 Powershell 中正确添加用户邮箱或摆脱此错误?

答案1

您使用的是 Powershell 还是 Exchange 控制台?即使您将 Exchange 工具导入 Powershell,添加邮箱功能也无法使用(我从未让它工作过)。对于“添加邮箱”,您只能使用 Exchange 控制台。

相关内容