Active-Directory

從 Powershell 錯誤添加新的 Exchange 2013 郵箱

  • October 16, 2014

我正在嘗試通過 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 中正確添加使用者郵箱或擺脫此錯誤?

您使用的是 Powershell 還是 Exchange 控制台?即使您將交換工具導入 Powershell,添加郵箱功能也不起作用(我從來沒有讓它起作用)。對於“添加郵箱”,您只能使用交換控制台。

引用自:https://serverfault.com/questions/637327