Link to home
Start Free TrialLog in
Avatar of Sid_F
Sid_F

asked on

Report on public folder permissions and usage

Is there any way to run a full report on public folder usage and permissions on exchange 2013. thanks.
ASKER CERTIFIED SOLUTION
Avatar of ITguy565
ITguy565
Flag of United States of America 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
As for permissions ,  This script should get you what you are looking for :

reference : http://itstuffilearnedtoday.blogspot.com/2015/08/powershell-script-to-report-all.html

######### BEGIN SCRIPT #########

Write-Host -Foreground Red "This script must be run from the Exchange Management Shell!"
$Init = Read-Host "Press Enter to Continue"

#Get all of the Public Folders
$PublicFolders = get-publicfolder -recurse

#Create a new array to hold the data
$Permissions = @()

Foreach ($Folder in $PublicFolders){
 #Full path and name of the public folder
 [string]$Foldername = ($Folder.ParentPath) + '\' + ($Folder.Name)
 
 #Get the permissions of the public Folder
 $FolderPermissions = Get-PublicFolderClientPermission $Folder
 
 Foreach ($Entry in $Folderpermissions){
  #If the User identity in NOT Null
  If (($Entry.User).ActiveDirectoryIdentity){
   #Get the User Identity of the permission
   $UserIdentity = (($Entry.User).ActiveDirectoryIdentity).ToString()
   
   #Create a new object to hold the data
   $PermissionItem = New-Object System.Object
   
   #Put the Full path and name of the public folder into the object
   $PermissionItem | Add-Member -type NoteProperty -name Folder -value $FolderName
   
   #Put the User Identity of the permission into the object
   $PermissionItem | Add-Member -type NoteProperty -name User -value ($Entry.User).ExchangeAddressBookDisplayName
   
   #Had to get funky here, and the Accessrights are an array and not readily enumaratable (is that even a word?)
   Foreach ($Value in ($Entry.AccessRights)){$Rights = (($Value.Permission).ToString())}
   
   #Add the user's rights to the object
   $PermissionItem | Add-Member -type NoteProperty -name Rights -value $Rights
   
   #Add the object into the array
   $Permissions += $PermissionItem
  } #End If
 } #End Foreach $Entry
} #End Foreach $Folder

#Export unique user values to a text document
$Permissions | select user -unique | sort user | out-file "C:\temp\UniquePublicFolderPermissions.txt"

#Export the permissions for all folders to CSV
$Permissions | Export-CSV "C:\temp\AllPublicFolderPemissions.csv" -NoTypeInformation

######### END SCRIPT #########

Open in new window

This is what, I run to pull the report.

Get-PublicFolder –identity “\PF NAME” -Recurse -ResultSize Unlimited | Get-PublicFolderClientPermission | Select Identity,User,{$_.AccessRights} | Export-CSV "c:\PF.csv"