Link to home
Start Free TrialLog in
Avatar of Anthony K O365
Anthony K O365Flag for United States of America

asked on

Public Folder Statistics--Powershell error

When running the following command, I get the following error:


PS C:\Powershell Cmd>Get-PublicFolderItemStatistics -identity Almeren  (this is a top-level folder)

No existing 'PublicFolder' matches the following Identity: 'almere'. Make sure that you specified the correct 'PublicFo
lder' Identity and that you have the necessary permissions to view 'PublicFolder'.
    + CategoryInfo          : NotSpecified: (0:Int32) [Get-PublicFolderItemStatistics], MapiOperationException
    + FullyQualifiedErrorId : 254EF81F,Microsoft.Exchange.Management.MapiTasks.GetPublicFolderItemStatistics

What the correct syntax? Should I put the server name first? (which I tried. Same error)


Also tried

Get-PublicFolderItemStatistics -Identity "Almeren" | Select Subject,LastModificationTime,HasAttachments,ItemType,MessageSize | Export-CSV C:\PFItemStats.csv
ASKER CERTIFIED SOLUTION
Avatar of Simon Butler (Sembee)
Simon Butler (Sembee)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony K O365

ASKER

Is there a way to get the Stats of all PF at one time?
Do you realise what it pulls out? It is information about every item, so if you have large public folders it will cough out a lot of content.

I haven't tried this, as I don't have a small public folder database to test it on, but this may work:

get-publicfolderitemstatistics  -identity "\" -Recurse

I know that works for other commands with public folders, but I don't really want to try it with a live system myself.

Simon.
Thanks much!! You've answered both questions.
Both questions were answered.