Get the list of all the public folders and the size in csv format.

Hello All,

I would like to get the list of all the public folders and the size. I got the below cmdlet, however i was unable to get the size of PF.

I just want identity, User, AccessRights and Size.

Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select Identity,User,{$_.AccessRights} | Export-CSV "C:\PFPermissions.csv"

Can anyone please help me.

THanks
Krish
LVL 7
krish5musicAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ibrahim BennaTechnology LeadCommented:
You can actually use this script (https://gallery.technet.microsoft.com/office/Create-Detailed-Public-10d0e4ea) as it provides a detailed report of your public folders.
krish5musicAuthor Commented:
Hi Ibrahim,

I have checked the link, but it doesn't have accessrights information.

I mainly want both accessrights and size.

Thanks
Krish
Pete LongTechnical ConsultantCommented:
Exchange version?
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

krish5musicAuthor Commented:
Hi Pete,

Its for Exchange 2010.

Thanks
Krish
Philip ElderTechnical Architect - HA/Compute/StorageCommented:
The PowerShell is correct for working with Public Folder permissions. A separate PoSh cmdlet, Get-PublicFolderStatistics, would be needed to get stats about the Public Folders themselves.
Get-PublicFolderStatistics -ResultSize Unlimited | Select-Object Name,FolderPath, AssociatedItemCount, DeletedItemCount, ItemCount, TotalAssociatedItemSize, TotalDeletedItemSize, TotalItemSize | Export-csv .\PFStatistics.csv -NoTypeInformation

Open in new window

krish5musicAuthor Commented:
Hello Philip,

Thanks for your response. As i stated on my request, i need both permissions and size information.

I understand that there is a separate cmd let for permissions. But the main issue here is that, how can we combine both cmdlet in to one,?


Thanks
Krish
krish5musicAuthor Commented:
Hello Philip,

I even tried running the below cmdlet. But the result is not showing PF details of other servers.

Import-Csv "C:\temp\pf.csv" | Foreach-Object{Get-PublicFolderStatistics -ResultSize Unlimited -Identity $_.identity} | Select-Object Folderpath, TotalItemSize.

I got the below error.

Couldn't find public folder "pf name" on server "server that i runing the command".

Thanks
Krish
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.