Profile Picture

user count

Posted By mdahmke 6 Years Ago
You don't have permission to rate!
Author
Message
mdahmke
Posted 6 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 2, Visits: 3
Hello - I need a way of retrieving a list of domains and a count of the number of users per domain, similar to the old usercount.exe utility. The examples for the API objects don't really provide enough to go on. Where can I find sample code?



Thanks
Brandon Felger
Posted 6 Years Ago
View Quick Profile
Time Traveler

Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)Time Traveler (161 reputation)

Group: Moderators
Last Active: 6 Years Ago
Posts: 145, Visits: 49
Here is the code you would use for IMailAPI_NET. Make sure this is in your project references, and you have a using statement for it.



DomainCollection domains = new DomainCollection();



foreach (DomainData domain in domains)

{

// loadNow = true

// Load the collection immediately

// bLoadLite = true

// Since we're only grabbing the user counts, we don't need to fully

// load all the user data. This will populate the user objects in the

// collection with a minimal amount of data.

UserCollection users = new UserCollection(domain.HostName, true, true);



Console.WriteLine("Domain: " + domain.HostName + " UserCount: " + users.Count);

}








Brandon Felger

IMail Developer

Ipswitch


Similar Topics


Reading This Topic