Solved

Mail Enabled Public Folder

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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video discusses moving either the default database or any database to a new volume.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now