Get Report on Who has delegates Access on Mailbox ?

Get-ResourceDelegates

This Script will Get Report of Delegates rights in Office 365


This script check who has Delegates permission on mailbox and generate a report of all the mailbox in Office 365.
Save the below Code in text file and Save as PS1.

######################################
#Author = Sunil Chauhan
#Email-ID = sunilkms@gmail.com
# Name = Get-ResourceDelegates.ps1
######################################
 
cls
$C = 0
"
Please wait Getting Mailbox..."
$Mbx=Get-Mailbox -ResultSize Unlimited
"
Mailbox Data Fatched Completed."
start-sleep 1
"
Now will start checking Resource Delegates info...."
 
$ResourceDelegates=
foreach ($user in $mbx)
                {
                                $C++ ;
                                Write-host "Getting ResourceDelegates for User No = $c "
                                Get-CalendarProcessing $user.alias
                }
                               
$Report= $ResourceDelegates | Select Identity, ResourceDelegates
$exportReport= $report | Export-CSV "ResourceDelegates.csv"
"
Reporting completed, File Exported to ResourceDelegates.csv
"

Comments

  1. Greetings,

    I am trying to find a script that will do the following:
    1. Tell me who the delegate(s) are on someone's mailbox
    2. Find out what mailboxes a single user has access to.

    Are you able to assist?

    Thank You,

    E.T.

    ReplyDelete

  2. # 1st one

    Get-CalendarProcessing user1 | select ResourceDelegates

    #2nd one

    $mbx = get-mailbox -ResultSize unlimited

    $prm = foreach ($user in $mbx) {Get-MailboxPermission $user.alias}

    $prm | Group-Object -Property User

    ReplyDelete

Post a Comment