Report Exchange MailEnabled Public Folder and Anonymous has Contributor permission

Hello, I am trying to list mailenabled public folders that includes the Name, Identity, Mailenalbed, PrimarySMTPaddress and what permission the user "Anonymous" has to the PF.

this is what I found so far, and it meets part of my objective.
PS:\$Address = @{Name="SMTPAddress";expression={if ($_.MailEnabled -eq $True){Get-MailPublicFolder $_ | Select PrimarySMTPAddress}}}
PS:\get-PublicFolder "\" -Recurse | Sort-Object MailEnabled | select Name, Identity, MailEnabled, $Address | ft -AutoSize

using the above I'm not sure how to add : get-PublicFolder "\" -Recurse | Get-PublicFolderClientPermission -user Anonymous |fl
Who is Participating?
Chris DentConnect With a Mentor PowerShell DeveloperCommented:
Doesn't need too much of a modification:
$Address = @{Name="SMTPAddress";expression={if ($_.MailEnabled -eq $True){Get-MailPublicFolder $_ | Select -ExpandProperty PrimarySMTPAddress }}}
$AnonPermissions = @{Name="AnonymousPermissions";Expression={ Get-PublicFolderClientPermission $_.Identity -User Anonymous | Select-Object -ExpandProperty AccessRights }}

Get-PublicFolder "\" -Recurse | Select-Object Name, Identity, MailEnabled, $Address, $AnonPermissions | Sort-Object MailEnabled

Open in new window

Note: ExpandProperty in the example above was introduced with PowerShell 2, we'll have to change stuff if you only have PowerShell 1 available.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.