Enable-Mailbox -identity on specified server
Hi, I've a problem. I want to create mailbox of existing user with cmdlet. I create a user and commit in AD with vb.net .(Note: AD have many DC ) After commiting user I want to create mailbox with cmdlet, but I got an error about user not found (DC's are not replicated). But after 3-5 munite cmdlet works succesfully. So, Can I give Enable-Mailbox -identity with specified dc, not domain\username ? Enable-Mailbox -identity domain\user -alias example -database \aaa\aaa\aa works succesfully.
December 21st, 2010 10:50am

What version of Exchange? You can run: Enable-Mailbox -Identity domain\user -Alias example -Database \aaa\aaa\aa -DomainController dc.company.com That will ensure that the cmdlet looks to the DC you specified when you created the user account in VB.NET. If you didn't specify a domain controller, you can use the ADSI cmdlets to select one and specify it, or specify the one that's assigned to your script by default, and use that same DC in the PowerShell cmdlet. Is there any reason you don't just do everything with New-Mailbox and Set-Mailbox instead? Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 12:52pm

First of all, thank you. Exchange 2007. I have different structure and controls to create user between another systems such as SQL. 1) -Identity domain\user is a search base of user in Active Directory, -domainController dc.company.com writes the changes of configuration but the problem is find user in Active Directory.http://technet.microsoft.com/en-us/library/aa998251.aspx And I tried Enable-Mailbox -Identity 'LDAP://IPADDRESS/CN=aaa,ou=bbb,dc=company,dc=com' -Alias example -Database \aaa\aaa\aa so it wasn't work. 2) I don't have any way to run cmdlet on exchange or any dc. cmdlet work on a webservice. So I have to create user in a dc and enable mailbox in a exchange dc. How can I use ADSI cmdlets?
December 21st, 2010 3:10pm

I'm not sure I understand your problem. If you want to make sure you enable the mailbox of an existing user, you might the following command: Get-User -Identity Domain\User -DomainController dc.domain.com | Enable-Mailbox -Alias example -Database server\sg\db -DomainController dc.domain.com I'm not sure I understand your second question. You can run Exchange cmdlets on any machine that has the Exchange Management Tools installed.Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
December 22nd, 2010 11:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics