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

krish5music
krish5music used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
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.

Author

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 Consultant

Commented:
Exchange version?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Hi Pete,

Its for Exchange 2010.

Thanks
Krish
Philip ElderTechnical Architect - HA/Compute/Storage

Commented:
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

Author

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

Author

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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial