• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 909
  • Last Modified:

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
1 Solution
Chris DentPowerShell 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.



Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now