Delegates Report for Exchange Server 2007/2010/2013

Looking for a script to export the delegates lists for all the mailboxes in your company? you are in correct place, this script will help you to get a Delegates Report in a CSV format. Script will give the report of User Alias, Display Name, Email Addresses and the Delegate lis

 
 
 
 
 
(0)
Add to favorites
Exchange
3/10/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Sample Report
    1 Posts | Last post November 13, 2017
    • Hi Rajkumar, 
      
      I got into this post as I have been doing some research on mailbox migration for my company. My supervisor asked for some sample reports but I am not technical enough to run the script. Would you mind sharing how the result looks like after the script is run?
      
      Cheers,
      Miriam
  • Runing this will list all mboxes
    1 Posts | Last post December 10, 2014
    • Did a test in my lab. But the script list All mailboxes. I just want mailboxes with delegates.
  • Some quick updates to use this out of the box
    1 Posts | Last post June 26, 2014
    • A few quick notes:
      
      -	For Exchange 2010/2013, change get-MailboxCalendarSettings to get-mailboxCalendarConfiguration
      -	The output file path is c:\MailboxReport.csv and the $attachment value is c:\temp\DelegatesReport.csv in the send-mailmessage cmdlet.  They’d need to match for the attachment to come through  
      -	In order for mail to work, you’ll need to modify the $ToAddress and $fromAddress fields as well as the SMTP server in the send-mailmessage command
      -	Additionally, if you don’t have your localhost configured to accept the email, you likely won’t get the file emailed to you.  Easier to just grab the CSV file to be honest.
      -	After all that, you get a CSV with no delegates in that column
      
      So here’s one line to replace this entire script
      
      Get-Mailbox -ResultSize unlimited | Get-CalendarProcessing | where { $_.ResourceDelegates -ne "" }
      | Select-Object identity,@{Name=’ResourceDelegates’;Expression={[string]::join(",", ($_.ResourceDelegates))}} | Export-csv -Path c:\temp\ResourceDelegates.csv
      
  • Error
    1 Posts | Last post May 15, 2014
    • I get this error:
      
      You must provide a value expression on the right-hand side of the '-' operator.
      At C:\delegates.ps1:18 char:35
      + $delegateString = $delegateNames -J <<<< oin ","
  • Missing curly bracket
    2 Posts | Last post March 10, 2014
    • I think your script is missing the closing "right curly bracket" for the "foreach ($user in $MailboxUsers)". It should appear before the line "# Export the output as CSV File".
    • Thank you Rich :)
  • Where is the updated version?
    4 Posts | Last post March 10, 2014
    • Where is the updated version? Perhaps update the post?
    • There is no update to that script, inform if any issue or modification required. Thanks
    • A close brace "}" is missing in order to end the Foreach loop. It needs to be inserted below the "$Output += $OutputItem;" line.
    • I have updated the script, hope it works now :)
  • not working
    1 Posts | Last post November 04, 2013
    • Not working on Exchange 2010 - Looks like the cmdlet get-mailboxcalendarsettings no longer exists, need to use get-calendarprocessing instead.
  • How to run
    2 Posts | Last post October 25, 2013
    • I do not know much about powershell. How do I actually run this script? Do I need to paste this into a text file and name it something specific? Do I do something from the Exchange Management Shell? Your help is much apopreciated and thank you for your time writing this script!
    • Open a Notepad and copy the script, save it as delegates.ps1 on any directory that you wish...
      
      From Powershell, navigate to the directory and type ./delegates.ps1
  • Can you help me resolve this error?
    2 Posts | Last post July 18, 2013
    • Rajkumar,
      
      Trying to use your script to fomat a delegates report.  I modified it by removing the output section so that I could see the output on the screen. See below:
      
      $MailboxUsers = get-mailboxdatabase | get-mailbox  -resultsize Unlimited | sort displayname 
      $Output=@(); 
      # Perform a set of actions against each mailbox - Loop 
      foreach ($user in $MailboxUsers) 
      { 
      $Name = $user.Alias 
      $OutputItem = New-Object Object; 
      $delegates = Get-MailboxCalendarsettings $name |where {$_.resourcedelegates -notlike “”} 
      $delegateNames = $delegates.ResourceDelegates | ForEach { $_.Name } 
      $delegateString = $delegateNames -Join ", " 
       
      # Get the desired Ouputs 
      $Select | Add-Member NoteProperty Alias $user.alias; 
      $Select | Add-Member NoteProperty "Display Name" $user.name; 
      $Select | Add-Member NoteProperty "PrimarySMTPAddress" $user.PrimarySMTPAddress; 
      $Select | Add-Member NoteProperty "Delegates" $DelegateString;} 
      
      
      But I'm receiving the following error:
      
      Add-Member : Cannot bind argument to parameter 'InputObject' because it is null.
      At C:\scripts\wallys-script\Delegates Report1.ps1:16 char:21
      + $Select | Add-Member <<<<  NoteProperty "PrimarySMTPAddress" $user.PrimarySMTPAddress;
          + CategoryInfo          : InvalidData: (:) [Add-Member], ParameterBindingValidationException
          + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
      
      
      Can you help me resolve this?
    • Really sorry, there is a typo and I changed it now. can you please use the updated one?