We are migrating public folders from on-premise to 365 Shared Mailboxes. The limits are 100 GB (or it is archived) and 100k objects.
I have a Public Folder that is 150GB. It is full of old items.
I need to prove that less than 100GB is newer than 2020. I have not seen anything that will show the age of objects in a non-mail-enabled public folder.
I have different scripts that do everything conceivable on public folders, except this. Perhaps a regex solution.
Here is a script that returns high-level information, but not the stuff I need.
### Get all pub folders
$publicFolders = Get-exPublicFolder "\PathToPubFolders" -Recurse -resultsize unlimited | Select-Object identity
### Get Folderstats
ForEach($publicfolder in $publicFolders){
$PFID = $publicfolder.identity
$Results = Get-exPublicFolderStatistics -Identity "$PFID"
}
$Results | Export-csv "PathTo.csv" -Append -NoTypeInformation