Export exchange 2003 public folder information to excel csv html email
This exports the Path, Messagecount, TotalMessageSize, Contactcount, LastModificationtime in order to use the script replace <DNSEXCHANGEMB> with the target 2003 exchange mailbox server you want user information from. You must run this once for each 2003 mailbox server! The output is placed on the desktop.
This is very usefully in planning public folder migrations, as it gives size and usage information (for killing off unused public folders)
Source
#Updated removed the many year old, version and updated with the one i currently use
#run from a machine with at least powershell 3, it places the results on your desktop
#
# ***** You must run this once for each 2003 mailbox server!
gwmi -computer <DNSEXCHANGEMB> -namespace "root/MicrosoftExchangeV2" -query "select * from Exchange_PublicFolder" | select Path, Messagecount, TotalMessageSize, Contactcount, LastModificationtime | Export-Csv -Path ("" + $env:USERPROFILE + "\Desktop\Exchange2003PublicFoldersReport.csv")