Listing public folders
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
Listing public folders

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Sac
Guest





Posted: Thu Nov 17, 2005 5:58 pm    Post subject: Listing public folders Reply with quote

I want to list the public folders to find the disk usage of each one and get
the sum.

I am using following code for the same,

query = String.Format("Select Path, TotalMessageSize,
StorageLimitStyle, ProhibitPostLimit, ReplicaList from Exchange_PublicFolder
where
FolderTree='Exchange_FolderTree.Name=\"{0}\",AdministrativeGroup=\"{1}\"'",
folderTree.Name, folderTree.AdministrativeGroup);

ManagementScope oMs = new
ManagementScope(String.Format("\\\\{0}\\root\\MicrosoftExchangeV2",
serverName));
ObjectQuery objQuery = new ObjectQuery(query);
ManagementObjectSearcher searcher = new
ManagementObjectSearcher(oMs,objQuery);

objectCollection = searcher.Get();

This code returns public folders list but only for root public folders. It
does not list child public folders.
This problem is observed only after installing Exchange 2003 service pack 2.
Before it was listing child public folders as well.

Any one have any idea?

I tried another way which works but I want to use Query which is not
possible in this ways,

ManagementScope oMs = new
ManagementScope(String.Format("\\\\{0}\\root\\MicrosoftExchangeV2",
serverName));
ManagementPath managemetPath = new
ManagementPath(String.Format("\\root\\MicrosoftExchangeV2:{0}", path));
ObjectGetOptions objectGetOptions = new ObjectGetOptions();
ManagementClass managementClass = new ManagementClass(oMs,
managemetPath, objectGetOptions);
objectCollection = managementClass.GetInstances();

Can anyone help me knowing what is going wrong with first method? What is
changed in Exchange 2003 SP2? Is there any other way to enumerate public
folder data efficiently?

Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB