2

Is it possible to search for all folders and sufolders in public folders by giving the path of the folders??

user1891567
  • 681
  • 2
  • 10
  • 15
  • See answer: http://stackoverflow.com/questions/14561124/searching-of-folders-in-public-folders-by-giving-its-path-name/15276349#15276349 – ono2012 Mar 18 '13 at 13:03

2 Answers2

0

Try:

Get-PublicFolder -Identity <ParentFolderPath> -Recurse

For example:

Get-PublicFolder -Identity "\NON_IPM_SUBTREE\schema-root" -Recurse

Should yield the default folders:

Name                                                        Parent Path
----                                                        -----------
schema-root                                                 \NON_IPM_SUBTREE
Default                                                     \NON_IPM_SUBTREE\schema-root
microsoft                                                   \NON_IPM_SUBTREE\schema-root
exchangeV1                                                  \NON_IPM_SUBTREE\schema->root\microsoft
BHall
  • 308
  • 1
  • 11
  • Hi BHall, Thanks for u reply.I need to do with EWS Managed API.Not with powershell. – user1891567 Feb 04 '13 at 13:00
  • I apologize. It wasn't clear in the title, but now I see the API and C# tags. I don't know the programming side of Exchange, just the infrastructure side. I see that you have answers to your other EWS post, good luck! – BHall Feb 04 '13 at 17:20
  • Hi BHall,Tanks for your reply. – user1891567 Feb 07 '13 at 10:27
-1

Using:

Directory.GetDirectories(path, "*", SearchOption.AllDirectories);

is a static class and avoids creating an instance.

See Directory vs DirectoryInfo for more information

Community
  • 1
  • 1
Sam Leach
  • 12,746
  • 9
  • 45
  • 73