Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Export/Import Public Folder Email Addresses

Posted on 2009-02-16
9
Medium Priority
?
1,766 Views
Last Modified: 2012-05-06
A company recently merged with another company and we are inthe process of performing a cross forest migration. While all is done, there is one step that i need some help with.

we have over 13000 public folders that have been replicated using the inter-org replication tool. The problem here is that, around 5000 of them are mail-enabled.

Without going through all of them manually, is there an easy way to add additional smtp (proxyaddresses) to all of them. Or export that list from the old forest and import into the new forest? All folders have the same name, but are in the new forest.

Any suggestions are appreciated.

0
Comment
Question by:advserver
  • 5
  • 2
  • 2
9 Comments
 
LVL 57

Assisted Solution

by:Mike Kline
Mike Kline earned 1000 total points
ID: 23655136
ADModify may be what you need for this
http://www.codeplex.com/admodify
A good overview here
http://www.msexchange.org/articles/ADModify-Change-Exchange-Specific-AD-User-Attributes.html
I've used admodify in production but never for public folders and I don't have any in my lab to test with or I would.
Seems like you should be able to add the address.
Hope that helps
Thanks
Mike
0
 
LVL 4

Author Comment

by:advserver
ID: 23655981
i have used admodify 1.6 and 2.0, but like you never for public folders, i did query the directory and found 1619 public folders, i am wondering why i only found that many. I am sure that i have over 5000 that are mail enabled.

i was trying to think of a way to update these via RUS, but that doesnt appear to be working, even if i use admodify and select update based on RUS.

0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 23656740
That is interesting;
I wonder if an adfind command would find mroe
something like
adfind -default -f  "&(objectcategory=publicfolder)(proxyaddresses=*)"
Wish I had a system with mail enabled public folders to test this on.
Thanks
Mike
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
LVL 11

Assisted Solution

by:sandeep_narkhede
sandeep_narkhede earned 1000 total points
ID: 23658405
strComputer = "."
strFile = "C:\Documents and Settings\ekrengel\Desktop\Public Folder Script\Public Folders.xls"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & _
"\ROOT\MicrosoftExchangeV2")

Set colItems = objWMIService.ExecQuery _
("Select * from Exchange_PublicFolder")

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.Workbooks.Add
objExcel.Cells(1,1).Value = "All Public Folder in Domain "
objExcel.Cells(1,1).Font.Bold = True
objExcel.Cells(1,1).Font.Size = 13
objExcel.Cells(1,1).Interior.ColorIndex = 11
objExcel.Cells(1,1).Interior.Pattern = 1 'xlSolid
objExcel.Cells(1,1).Font.ColorIndex = 2
objExcel.Cells(1,1).Borders.LineStyle = 1 '= xlSolid
objExcel.Cells(1,1).WrapText = True

objExcel.Cells(2,1).Value = "Time: " & Now
objExcel.Cells(2,1).Font.Bold = True
objExcel.Cells(2,1).Font.Size = 12
objExcel.Cells(2,1).Interior.ColorIndex = 11
objExcel.Cells(2,1).Interior.Pattern = 1 'xlSolid
objExcel.Cells(2,1).Font.ColorIndex = 2
objExcel.Cells(2,1).Borders.LineStyle = 1 '= xlSolid
objExcel.Cells(2,1).WrapText = True

objExcel.Cells(4,1).Value = "Folder Name"
objExcel.Cells(4,1).Font.Bold = True
objExcel.Cells(4,1).Font.Size = 11
objExcel.Cells(4,2).Value = "Email Address"
objExcel.Cells(4,2).Font.Bold = True
objExcel.Cells(4,2).Font.Size = 11
objExcel.Cells(4,3).Value = "Creation Time"
objExcel.Cells(4,3).Font.Bold = True
objExcel.Cells(4,3).Font.Size = 11

x = 5
y = 1

For Each PFolder in colItems
strProxyAddresses = "IsMailEnabled= False"
strDisplayName = PFolder.AddressBookName
strSecondary = ""
Secondary = ""
If PFolder.IsMailEnabled=TRUE then
strProxyAddresses = GetProxies(strDisplayName)
End If

y1 = y
objExcel.Cells(x,y1).Value = strDisplayName
y1 = y1 + 1
objExcel.Cells(x,y1).Value = strProxyAddresses
y1 = y1 + 1
objExcel.Cells(x,y1).Value = PFolder.CreationTime
x = x + 1 'go to the next Row

Next

objExcel.Columns("A:C").Select
objExcel.Selection.HorizontalAlignment = 3 'xlCenter
objExcel.Selection.Borders.LineStyle = 1 '= xlSolid

objExcel.Range("A1","C1").MergeCells = 1
objExcel.Range("A2","C2").MergeCells = 1

objExcel.Columns("A:AH").EntireColumn.AutoFit

objExcel.DisplayAlerts = False
Set objWorkbook = objExcel.ActiveWorkbook
objWorkbook.SaveAs strFile
objWorkbook.Close
objExcel.Quit

msgbox "Script Complete!"

Wscript.Quit

Function GetProxies(AddressBookName)
on error resume next
Primary = ""
Secondary = ""
Set rootDSE = GetObject("LDAP://RootDSE")
DomainContainer = rootDSE.Get("defaultNamingContext")

Set conn = CreateObject("ADODB.Connection")
conn.Provider = "ADSDSOObject"
conn.Open "ADs Provider"

ldapStr = "<LDAP://" & DomainContainer & ">;(&(&(&(&" & _
"(| (objectCategory=publicFolder) )))(objectCategory=publicFolder)" & _
"(displayName="& AddressBookName &")));adspath;subtree"

Set rs = conn.Execute(ldapStr)

Set oPublicFolder = GetObject(rs.Fields(0).Value)

err.Erase
For each email in oPublicFolder.proxyAddresses
If Left(email,5) = UCase("SMTP:") Then
Primary = Mid (email,6)
'Exit For
ElseIf Left(email,5) = LCase("smtp:") Then
Secondary = Mid (email,6) & "; " & Secondary
End If
Next
If Err.number then _
Primary = Mid (oPublicFolder.proxyAddresses,6)

GetProxies = Primary

End Function
0
 
LVL 4

Author Comment

by:advserver
ID: 23660332
thanks for the script sandeep, could you explain a bit more on this for me please.
it appears to be two scripts. any additional assistance would be greatly appreciated.

0
 
LVL 11

Expert Comment

by:sandeep_narkhede
ID: 23660368
There's only one script at the end i have two functions
0
 
LVL 4

Author Comment

by:advserver
ID: 23660578
thanks again, i will try this in my lab. I will let you know
0
 
LVL 4

Author Comment

by:advserver
ID: 23673159
Sandeep,
i put the script on my exchange server as a .vbs and ran in, the command shell appears and that is about all. Could you possibly provide additional instructions for me?
0
 
LVL 4

Accepted Solution

by:
advserver earned 0 total points
ID: 23787763
i have resolved this myself..but it did take a script.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

810 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