简体   繁体   English

订阅在Exchange Server 2010中创建新邮箱时引发的事件

[英]Subscribing to the event raised when a new mailbox is created in Exchange Server 2010

Using PowerShell, it is possible to subscribe to a .NET, WMI or engine event via Register-ObjectEvent, Register-WmiEvent or Register-EngineEvent, respectfully, and each of these cmdlets have an –Action parameter to which you can hand a block of code that is to be invoked when the event occurs. 使用PowerShell,可以分别通过Register-ObjectEvent,Register-WmiEvent或Register-EngineEvent订阅.NET,WMI或引擎事件,并且这些cmdlet均具有–Action参数,您可以将其传递给事件发生时要调用的代码。

I can't seem to figure out how, using one of the above event types (a .NET, WMI or engine event), I might be able to subscribe to the event that is raised on the creation of a new mailbox in Exchange Server 2010. To be more specific, I'm simply trying to figure out what event I need to subscribe to. 我似乎无法弄清楚如何使用上述事件类型之一(.NET,WMI或引擎事件)来订阅在Exchange Server中创建新邮箱时引发的事件2010。更具体地说,我只是想弄清楚我需要订阅什么活动。 Along these lines, I was hoping someone might be able to point me in the right direction as to where I could find more details on which events I can subscribe to in Exchange Server 2010 and the args that are passed when the event is raised. 沿着这些思路,我希望有人可以向我指出正确的方向,以便我在哪里可以找到有关可以在Exchange Server 2010中订阅的事件以及引发事件时传递的参数的更多详细信息。

To provide some context here, I have a cloud based mail service that needs to know how many users a given organization is using. 为了提供一些背景信息,我有一个基于云的邮件服务,该服务需要知道给定组织正在使用多少用户。 Doing something like an AD sync is not an option. 不能进行AD同步之类的操作。 I have access to the Exchange Server 2010 server during the initial provisioning of the service and I will be able to execute PowerShell scripts in their environment at this time (PowerShell 2.0). 在服务的初始配置期间,我可以访问Exchange Server 2010服务器,并且此时我将能够在其环境中执行PowerShell脚本(PowerShell 2.0)。 Ideally I would like to have the -Action parameter execute a block of code that makes a call to my API notifying me that a new mailbox has been provisioned. 理想情况下,我希望-Action参数执行代码块,该代码块对我的API进行调用,以通知我已设置了新邮箱。

I am a .NET developer but I am new to working with Exchange and fairly new to working with PowerShell especially in this context. 我是.NET开发人员,但是对Exchange还是陌生的,尤其是在这种情况下,对PowerShell的陌生。 I can work out the scripts/code myself, but I would like to figure out if I can even subscribe to a new mailbox event before I go too far down this path. 我可以自己编写脚本/代码,但我想弄清楚在我走这条路之前是否可以订阅新的邮箱事件。

Any help here would be greatly appreciated! 在这里的任何帮助将不胜感激!

I'm not aware of Exchange raising any event in any of those contexts. 我不知道Exchange在任何情况下都会引发任何事件。 Do you have access to the actual Exchange servers, or are you just a tenant? 您可以访问实际的Exchange服务器,还是只是租户?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM