使用VB.NET创建Exchange 2007邮箱 [英] Creating an exchange 2007 mailbox using VB.NET

查看:76
本文介绍了使用VB.NET创建Exchange 2007邮箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的组织有一个自定义应用程序,用于创建和管理AD用户和交换邮箱。在2003年的交换中,这非常有效。今年早些时候,我们实施了Exchange 2007.对代码进行了一些更改以使其保持运行 - 并且
成功创建了邮箱。这一过程一直持续到我们删除最后一台Exchange 2003服务器。

My organization has a custom application for creating and managing AD users and exchange mailboxes. Under exchange 2003 this worked perfectly. Earlier this year we implemented exchange 2007. Some alterations were made to the code to keep it running - and successfully creating mailboxes. This worked up until we removed the last exchange 2003 server.

现在代码正常运行(没有报告错误/它没有崩溃)但是正在创建的邮箱不完整。特别是丢失了应该由收件人策略应用的任何内容 - 例如SMTP地址。此外,"基于电子邮件地址策略自动更新电子邮件
地址"。复选框未被选中。

Now the code runs as normal (no errors are reported/ it doesn't crash) but the mailboxes being created are incomplete. Specifically anything that should be applied by recipient policy is missing - like SMTP addresses. Also the "Automatically update e-mail addresses based on e-mail address policy" check box is unticked.

我尝试使用ADSIedit来查看触发收件人策略可能需要哪些其他属性。我的实验以及我们的顾问提供的信息得出的结论是,收件人政策不再以任何形式自动执行
- 即需要直接调用以在新邮箱上运行。

I experimented with ADSIedit to see what additional attributes might be required to trigger recipient policy. My experiments, and information provided by our consultant, have concluded that recipient policy does not run on any sort of automated schedule any more - i.e. it needs to be called directly to run on a new mailbox.

所以,我的问题很广泛:你如何使用VB.Net创建Exchange 2007邮箱?

So, broadly my question is: How do you create an exchange 2007 mailbox using VB.Net?

但更具体地说,我的问题是:如何正确启用"自动更新电子邮件地址......"并使其在新邮箱上运行?

But more specifically, my question is: How do I correctly enable 'automatically update email addresses...' and cause it to run on a new mailbox?

作为参考,我知道在EMC工作时手动勾选该框。使用powershell命令set-mailbox似乎也可以工作,即使这有点不合逻辑。我怀疑它的工作原理是因为set-mailbox命令以某种方式触发了收件人策略。但是如果Powershell可以触发它,那么
,那么vb.net必须能够这样做。

For reference, I know that ticking the box manually in EMC works. Using the powershell command set-mailbox seems to work also, even though that is somewhat illogical. I suspect it works because the set-mailbox command somehow triggers recipient policy. However if Powershell can trigger it, then vb.net must be capable of doing so.

虽然环境中仍然有Exchange 2003服务器,但填充以下属性是足以导致创建邮箱并应用策略:

While there was still an exchange 2003 server in the environment, populating the following attributes was enough to cause a mailbox to be created and policy applied:

homemdb

msExchHomeServerName

mailNickName

legacyExchangeDN

msExchVersion

msExchRecipientDisplayType

msExchRecipientTypeDetails

msExchMailboxGuid

homemdb
msExchHomeServerName
mailNickName
legacyExchangeDN
msExchVersion
msExchRecipientDisplayType
msExchRecipientTypeDetails
msExchMailboxGuid

我的意图不是要从vb.net调用powershell,因为使用两种语言来完成一项任务似乎很奇怪。必须有一个本机.NET方法来执行此操作。可能它涉及Exhcange Web服务(EWS)但到目前为止我还没有找到任何关于如何使用EWS创建邮箱的明确指示

My intent is not to call powershell from vb.net, as it seems strange to use two languages to acheive one task. There must be a native .NET way to do this. Possibly it involves Exhcange Web Service (EWS) but so far I haven't been able to find any clear indication of how to use EWS to create a mailbox.

目前应用程序是用vb.net 2.0编写的,但如果需要,它可以升级到3.5或4.

Currently the application is written in vb.net 2.0, but it could be upgraded to 3.5 or 4 if required.

任何人都可以帮忙吗?

推荐答案

供参考;我最初在MSDN论坛上提出这个问题:
http://social.msdn.microsoft.com/Forums/en-us/vbgeneral/thread/a5bda385-4673-4bcf-82ec-4d4ade11b294
 但他们建议我在这里试试'对Exchange不熟悉。

For reference; I originally asked this question in the MSDN forum: http://social.msdn.microsoft.com/Forums/en-us/vbgeneral/thread/a5bda385-4673-4bcf-82ec-4d4ade11b294 but they have suggested that I try here as they're not familiar enough with Exchange.


这篇关于使用VB.NET创建Exchange 2007邮箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆