Exchange Meeting Room Statistics

This script uses Exchange Web Services to connect to one or more meeting rooms and gather statistics regarding their usage between to specific dates.

 
 
 
 
 
4.5 Star
(6)
6,615 times
Add to favorites
Exchange
12/15/2017
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Walk through running script from computer
    2 Posts | Last post November 08, 2019
    • When I run the script and put in the smtp of the room (ex.. room1@test.com -ExchangeOnline) because its Office365, the script just closes and I get no results. What am I missing?
    • How exactly are you calling the script? Also, have you tried with the "-Verbose" switch?
  • What if we need get the statistics of all rooms belonging to a room list?
    2 Posts | Last post November 08, 2019
    • We have a scenario where we want this data basis roomlist locations like we have roomlist for Spain,Germany,UK and so on... what changes to be done to the script to make it work? 
      
      Please Can you help?
    • Can't you call the script multiple time, each time with the rooms for each location and exporting to a file with the location name for example? Do you have the room's location in any of the mailbox properties?
  • How will i run for all rooms in EXO
    2 Posts | Last post November 08, 2019
    • Great script. How will i make it working for all room or i can add like $room=1,2,3,4 and run like 
      
      .\Get-MeetingRoomStats.ps1 -RoomListSMTP $room -From "04/01/2019" -To "11/02/2019" -Verbose  -ExchangeOnline >>nyon.csv
      ==============================================================================
      .\Get-MeetingRoomStats.ps1 -RoomListSMTP EUNyon_Horw@domain.com -From "04/01/2019" -To "11/02/2019" -Verbose  -ExchangeOnline >>nyon.csv
    • Hi Manoj,
      
      The RoomListSMTP parameter is a string, so that method should work (although I haven't tested it). The ">> nyon.csv" at the end, when calling the script, will definitely not work. To export to CSV, just update the Export-CSV line in the script to your desired file.
      
      Regards,
      Nuno
  • Works with MFA
    3 Posts | Last post November 08, 2019
    • Hi Nuno.  Will this work with MFA?  I know my permissions are correct.  We're in hybrid mode using Exchange online.  I'm getting the same 'unauthorized' error as MeaSri.
    • Disregard.  The two things i did differently to make it work, in case anyone else runs into this, is that when i was prompted by the script to enter my credentials, i needed to enter them in the UPN format of UserID@company.com.  Previously it was entered as company\UserID.  I don't know why this matter, but i used the UPN format when connecting to Exchange Online with MFA prior to running the script, so i decided to keep it consistent.  The other item was entering the conference rooms UPN instead of it's primary smtp.  Again, not sure why this would matter, but it's working now.  :)
    • Hi Tom,
      
      Apologies for the delay in replying... Glad it is working!   :)
      
      Regards, Nuno
  • Binding Error
    7 Posts | Last post September 16, 2019
    • Hi Nuno,
      
      Thank you for this script!
      
      I tried running this but i have been getting an error "Unable to connect to xyz@domain.com. Please check permissions: Exception calling "Bind" with "2"
      argument(s): "The request failed. The remote server returned an error: (401) Unauthorized.". Skipping xyz@domain.com"
      
      I have Hybrid environment and have full access on mailbox and Reviewer access on Calendar.Also i am a Global Admin on this tenant, but unable to resolve this issue of permission.
    • Hi MeaSri,
      
      Where is that particular meeting room located (on-prem or Exchange Online)? Where is the script connecting to (AutoDiscover)?
      
      Regards,
      Nuno
    • Hi Nuno,
      
      The meeting room is located on Exchange Online and script is "https://outlook.office365.com/EWS/Exchange.asmx"
      
      Do i need to make any changes in the script?
      
      Thank you,
      Mea
    • Hi Nuno,
      
      Can you check this as it is urgent and we don't have any other way to do this :)
      
      Thank you,
      Mea
    • Hi, I had the same error. The cause was MFA. Since you are Global Admin for tenant then MFA most likely is enabled by default. 
    • I have the same error. Hybrid Ex2016 on prem. Also a global admin in EXO.
      
      VERBOSE: Binding to the <mailbox> Calendar folder.
      VERBOSE: Unable to connect to <mailbox>. Please check permissions: Cannot find an overload for "Bind" and the argument count: "2".. Skipping <mailbox>.
      
      I granted FullAccess to my Global Admin account to the room mailbox.
    • Hi RhuntMT,
      
      Have you tested using OWA or Outlook to ensure your account does indeed have permissions to the mailbox? Reviewer rights to the Calendar will also work.
      Is the script connecting to the on-prem Exchange or Exchange Online?
      
      Regards,
      Nuno
  • not getting any output
    2 Posts | Last post August 18, 2019
    • Hi I am not getting any output when i run the ps1
    • Yes, it will also work for Exchange 2016. Try updating the following line:
      $service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2013_SP1)
      
      What level of permissions do you have to the room or room calendars? Does the account you are using have a mailbox?
  • No Averages per room
    6 Posts | Last post August 18, 2019
    • Hi Nuno,
      
      Great script works like a charm. You answered a question from a user a year ago who wanted to do away with the averages and get stats per room. I am struggling with the answer you gave. 
      
      Here is the question and your response could you elaborate, if possible.
      "Is there a chance to have script that does not make a Average of meeting? I need to know how many meeting were booked the last three months. I need to see how many people attended the specific meeting, in which meetingroom. Can that be done?
      We need to figure out how the meetingrooms are being booked, do we have enough, do we have too many big meetingrooms and so on. Therefore we cannot use average numbers..."
      
      Your response was:
      "Sure, it doesn't take much work to update the script for what you want. Using my latest script on TechNet (https://gallery.technet.microsoft.com/Exchange-Meeting-Room-2aab769a) which uses EWS instead, all you have to do is put the:
      $romObj = New-Object PSObject -Property @{
      
      inside the:
      ForEach ($meeting in $fiItems.Items) {
      
      and update the room object so that instead of saving averages, it saves the data for every single meeting."
    • Hi Bryan,
      
      Thank you for the feedback!
      The script goes through every meeting for a particular meeting room, and gathers stats for each of those meetings. Then, after all meetings have been processed, it created a PowerShell object for that meeting room, calculates some averages, and saves the object.
      So, if you create an object within each meeting instead of within each meeting room (with some unique identifier), than you can have stats for all meetings, instead of averages. You’ll just need to update the object with the information you want, and remove the averages.
      Hope that makes sense.
      
      Regards,
      Nuno
    • Hi Bryan,
      
      Thank you for the feedback!
      The script goes through every meeting for a particular meeting room, and gathers stats for each of those meetings. Then, after all meetings have been processed, it created a PowerShell object for that meeting room, calculates some averages, and saves the object.
      So, if you create an object within each meeting instead of within each meeting room (with some unique identifier), than you can have stats for all meetings, instead of averages. You’ll just need to update the object with the information you want, and remove the averages.
      Hope that makes sense.
      
      Regards,
      Nuno
    • Hi Nuno,
      I tried doing what you said to list out all of the meetings for a room but it blanks on output. Basically:
      
      ...
      [Array] $mtgsCol = @()
      ...
      ForEach ($meeting in $fiItems.Items) {
      blah blah unchanged
      
      # Save the information gathered into an object and add it to our object collection
      	$mtgObj = New-Object PSObject -Property @{
      	blah blah unchanged	
      	}
      $mtgsCol += $mtgObj
      }
      $mtgsCol | Select ID, From, To, RoomEmail, RoomName, Meetings, Duration, AvgDuration, TotAttendees, AvgAttendees, RecAttendees, OptAttendees, AMtotal, AMperc, PMtotal, PMperc, RecTotal, RecPerc, TopOrg, TopAtt | Sort From, RoomName, RoomEmail
      
      
      I tried printing results inside each meeting, inside each room, and outside everything and still doesn't work. What am I doing wrong? Any advice would be helpful. Thanks. 
    • Also, it works fine if I don't modify the code at all. All permissions and everything work just fine. Thanks.
    • Hi WingDingRule,
      
      Sorry, but is it working or not after all?
      If you want to print every single meeting, the $meeting is what you want (inside the "ForEach ($meeting in $fiItems.Items)" statement. That variable will include every meeting for that particular room.
      
      Regards,
      Nuno
  • No results
    3 Posts | Last post August 18, 2019
    • I tried running as you suggested for our Office 365 mailboxes, but the output is always blank.
    • I did not realize you had to install the EWS Managed API MSI package first.  The script is running but now my global admin doesn't have rights to the resource (unable to connect).
    • Hi Cathi,
      
      If you do not have the EWS API installed, the script should throw a warning and exit.
      What level of permissions do you have to the room or room calendars? Does the account you are using have a mailbox?
      
      Regards,
      Nuno
  • Will this work for Exchange 2016 CU12
    1 Posts | Last post July 30, 2019
    • Will this work for Exchange 2016 CU12
  • Suggestion on Parameters
    1 Posts | Last post July 19, 2019
    • Not a question, more a suggestion, if you replace the parameters to be:
      	[Parameter(Position = 1, Mandatory = $False)]
      	[DateTime] $From = (Get-Date -Day 1 -Hour 0 -Minute -0 -Second 0).AddMonths(-1),
      	
      	[Parameter(Position = 2, Mandatory = $False)]
      	[DateTime] $To = (Get-Date -Day 1 -Hour 0 -Minute -0 -Second 0),
      
      It will default to giving you the last months reports for the rooms selected. Handy if you are automating reports for the business.
      
      Awesome script all in all, thank you for taking the time to write it, this has opened up alot of reporting opportunities. 
      
      
1 - 10 of 40 Items