Solved

Mail Enabled Public Folder

Posted on 2013-06-03
3
593 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Find out what you should include to make the best professional email signature for your organization.
This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

821 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