Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6901
  • Last Modified:

How to export Public Folders into a CSV file by using Powershell

Hello Guys,

I am totally new with PowerShell and I will need to understand which commands I can use to import and export to a CSV file into Exchange 2007 environment.
I used to do the same with Exchange 2003 only by clicking with the right-button on the Public Folders and then "Export List". Does any one have an idea how I would be able to proceed? Maybe if you guys could give me just an idea I will be able to do it.
Thanks, LaranjaCarioca
0
LaranjaCarioca
Asked:
LaranjaCarioca
  • 5
  • 3
1 Solution
 
BSonPoshCommented:
Get-PublicFoler | export-csv <your file> -NoType
0
 
BSonPoshCommented:
sorry

get-publicfolder not Get-publicfoler
0
 
BSonPoshCommented:
btw... if you want all you need to add the -recurse

Get-PublicFolder -Recurse | Export-Csv <CSV File> -noType
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LaranjaCariocaAuthor Commented:
Sorry BSonPosh....what is -Recurse ?   if I want ALL, I did not get what you mean.
0
 
BSonPoshCommented:
-recurse means to process the entire tree (almost like a directory tree.)

If you do not use -recurse then it will only get one level of public folders
0
 
LaranjaCariocaAuthor Commented:
BSonPosh,

Really thanks for your help...do you think the following command would work?

Get-PublicFolder -Database server\storage group\public folder database -recurse | Export-Csv c:\PFcsvFile.csv
0
 
BSonPoshCommented:
If your wanting a specific Public folder you need to use the -id parameter.

How many public folders do you have?

I would step through the command (it doesnt change anything.)

PS> Get-PublicFolders
What did you get?

PS> Get-PublicFolders -recurse
Did you get more folders? Did you get the ones you wanted? To many?

Use "Get-Help Get-PublicFolders -full" for detailed help

0
 
LaranjaCariocaAuthor Commented:
Hello BSonPosh,

As a matter of fact it is just an example. Soon I will need to work with this and I just wanted to make sure how to get the public folders on a specific public folder and then save it into a CSV file.
Probably it will be lots of folders and subfolders.
I read the -full help for this command and I think it would work. As soon I get back something from the production mode, I will let you know...THANKS!

0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now