1

I am trying to add a new mailbox via the Powershell and I get the following error:

#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

If I tried to just add the mailbox by it's self, I get this error (it's looking for .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

I am pretty sure the error is from me not adding the .internal at user creation but I am unsure of how to initialize that field. (it could be something else too)

How do I correctly add a user mailbox in Powershell or get rid of this error?

  • Can you use a tool like ldp.exe to verify that this string is correct 'cn=DC01,DC=internal,DC=land,DC=edu'? – Mass Nerder Oct 15 '14 at 23:29
  • error, cannot open connection – user3766148 Oct 16 '14 at 1:11
3

Are you using Powershell or Exchange console? Even if you import the exchange tools into Powershell, the add mailbox feature won't work (I never got it to work). For 'add mailbox' you must use the exchange console only.

| improve this answer | |
  • Wow, that was it. Great call. Exchange console added the mailbox with no issues. – user3766148 Oct 16 '14 at 1:14
  • Just to expand on what @bro suggested, you can "import" the exchange tools into your regular PowerShell console using "Implicit Remoting." There's a good article on TechNet, but it boils down to: Create a new PSSession on your exchange server, then "import" that PSSession, which makes the cmdlets available to you, but they actually run on the remote server. – Windos Oct 23 '14 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.