We recently had a secretary who created a personal distribution list (PDL) with too many members.
This is a limitation of distribution lists that are created and stored in a Microsoft Exchange Server mailbox store or in a personal folders (.pst) file. There is no definite limit to the number of contacts that you can add to a distribution list.
In her case, she could no longer edit the list since it became too big. We found she could use OWA to open the DL, but still could not update it. Nice thing, is that OWA uses XML to display the PDL. Using a little PowerShell magic, I was able to dump that list into a CSV, so she could recreate the lists.
- Open PDL in OWA.
- Right click the window and select View Source on the popup window. Scroll down near the bottom, you'll find the XML section containing all the entries. Copy everything between < XML ID="MemberList" to the first /XML.
< xml id="memberlist> (blah blah blah) < /xml>
- Open PowerShell!
- Create a variable that equals this XML code. I enclosed the data inside single quotes. Use the [xml] prefix to set the data type on the variable. Note you may need to remove single quotes from any names, I had an O'Connor.
[XML] $Contacts = '< xml id="memberlist"> (blah blah blah) < /xml>'</code> </li>
<li>Now just crusie the XML structure:
<code>
$contacts.xml.cdldata.member | select dn, email | Export-Csv -path c:\My-ContactList.csv
</code></li>
</ol>
If you've got the right XML code from the web page, you should now have a CSV containing all the display names (DN) and the smtp email address from this PDL.
Comments
Post new comment