Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Mail Enabled Public Folder

Posted on 2013-06-03
3
Medium Priority
?
623 Views
Last Modified: 2013-06-19
Hi,

I need to create a mail-enabled public folder from a csv file.  The CSV file cotains

Folder,Email
ABC123,test@xxxx.com
XYZABC,tset@xxxx.com

The email address have to be the primary smtp address. And the public folder have to be inside "Client XX" public folder.  Can somebody give me the right powershell command for Exchange 2010? Thanks!
0
Comment
Question by:ImmanCan
  • 2
3 Comments
 
LVL 12

Expert Comment

by:SreRaj
ID: 39218599
Hi,

Please try the following code. I have put input values into a csv file named FolderList.csv.

$PFList=Import-CSV FolderList.csv
ForEach($PF in $PFList){
	New-PublicFolder -Name $PF.Folder -Path "\Client XX\"
	$FolderName="\Client XX\"+$PF.Folder
	Enable-MailPublicFolder -Identity $FolderName
	Set-MailPublicFolder -Identity $FolderName -PrimaySmtpAddress $PF.Email -EmailAddressPolicyEnabled $False
}

Open in new window

0
 

Author Comment

by:ImmanCan
ID: 39220659
Thanks for the reply... Sorry but I dont know how to run this code... will you be able to guide me?
0
 
LVL 12

Accepted Solution

by:
SreRaj earned 1500 total points
ID: 39221804
Please save the code to a file with extension .ps1 and execute it from Exchange Management Shell. Exchange Management Shell is the powershell command prompt for Exchange. Once you open EMS, browse to the location where .ps1 file stored. You can execute the file by ./<filename>.ps1. For example if you have named the file as PFCreate.ps1 the execute ./PFCreate.ps1

EMS
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question