Last post Jul 05, 2007 02:53 AM by Steve@Planet
Jul 04, 2007 10:04 AM|teebo|LINK
I'm looking for a way to count all the users of my Exchange Server through an MPS Web Service call (HMC 4.0).
Do you know of a specific method for that or do I have to loop through each OU ?
Jul 04, 2007 01:11 PM|Steve@Planet|LINK
You can use the Hosted Active Directory::ADSearch function to return all the users under Hosting. From this you can count the returned nodes.
Or you can write a Stored Procedure that counts the number of users with mailplans in the PlanManager DB. You would write a custom namespace to call this SP.
The SP will more more efficient, but you cannot call this via the current web services as an MPS General web service doesnt exist.
Jul 04, 2007 03:08 PM|teebo|LINK
[;)] Thanks Steve. ADSearch fits my need for the moment.
When you say "stored procedure", do you mean creating a Web Service under our own namespace that would query the AD database directly ?
Also would you say it's safe to execute some prompt commands remotely to retrieve some data unavailable under the MPS ?
Jul 05, 2007 02:53 AM|Steve@Planet|LINK
A stored procedure sits on the SQL server. You would need to call the SQL Provider namespace to access this SP.
So, you would need to create your own namespace function that calls this sql sp.
Then, you would need to craete a web service that calls this namespace. Bit long winded, but worth it.
Instead of executing remote scripts I would look at building my own MPS provider in VS 2005. Examples of this can be found in the MPS SDK.