Scripting : Teams Meetings Rooms Options

When you are setting, lots of meeting rooms up, it’s quite a tedious task to go through every single meeting room in manually set the meeting room options, this is where I think it was wise to crack out some scripting with powershell, and set options with a script.

Scripting ensures consistency across all the meeting rooms, and it’s not subject to human error, however, before you can script the settings, you need to know what you want set, this will depend on your organizational preferences, so please don’t just blindly follow this on your production system, as the scripts are subject to my specific requirements.

Create Teams for Rooms Script

First you need a CSV file with the following headers as below.......

Then you need to fill in the details for all the rooms you wish to create, so for example below is some of these values filled in:

Name: Bear Claws Room
DisplayName : Bear Claws Room
Capacity : 30
UPN: bear.claws@bear.local
Password: <password goes here>
Delegates: server.bear@bear.local

This would need to be added to the correct columsn in the CSV file, the you need to save that to a folder on the Exchange server, then you need the script below to make the rooms in Active Directory, just update <csv_path> with the path to your CSV file.

Import-Csv "<csv_path>"|%{New-Mailbox -Name $_.Name -DisplayName $_.Name -Database $_.Database -ResourceCapacity $_.Capacity-UserPrincipalName $_.UPN -Password (ConvertTo-SecureString $_.Password -AsPlainText -force) -Room }

Once you run that script, it will create all the rooms for you, automagically.

Set Options for your Meeting Rooms

This next section will get all the meeting room options, all you need for this CSV file is the "Name" of the room as per the last step.....

Once you have the file with a list of rooms you wish to update, you then need the script, which is below, however before you run this blindly read below the script....

Import-Csv "<csv_path>" | %{Set-CalendarProcessing $_.Name -AllowConflicts $false -BookingWindowInDays 360 -EnforceCapacity $True -ProcessExternalMeetingMessages $True -MaximumDurationInMinutes 1440 -DeleteComments $False -DeleteSubject $False -RemovePrivateProperty $False -DeleteAttachments $False -AddOrganizerToSubject $true}

This will set the following options, you may require other options......
  1. Deny Conflicting Appointments.
  2. Enforce Capacity is enabled for meetings.
  3. Maximum meeting is 24 hours for this room.
  4. Allow External meetings from outside the company
  5. Allow booking up to 360 days ahead of todays date.
  6. No not delete comments added to meetings.
  7. Do not delete the subject of the meeting.
  8. If a meeting is private keep that tag so the meeting says "Private Appointment"
  9. Doo not delete attachments from the meeting if anything is attached.
  10. Show the name of the Organiser with the Meeting Subject.
For a full list of options check out the site here

Now you can easily batch create accounts for your company or labs with zero human errors, you are not able to combine the scripts as thre CSV files are different and do different tasks, if you try to add on the settings with the original commands - the powershell does not like the CSV file with all the "setup" attributes.

Hybrid Setup?

If you have a hybrid setup - which means you sync for AD with AAD (which is Active Directory syncing with Azure active directory) you will have a product called AD-Connect - The job of that product is to get objects you sync in your local domain to the one in the cloud.

Therefore, if you are in a hybrid configuration do you need to create the account locally on exchange as room accounts, which is what the script does, however, if you try and get creative and crate those accounts directly in the cloud, you will set yourself up for failure in the future.

In the hybrid mode, your local, Active Directory will override anything in Azure Active Directory - this is the reason for the hybrid, which means if you create your accounts in the cloud, because you think it’s quicker you want to save some time, and then someone creates in account on your local AD with the same name, the account you created in the cloud will be automagically overwritten, and you will get some random hexadecimal value assigned to it, or even worse, you will get a synchronization conflict, and you will see neither of the accounts appear in the cloud.

I only point this out, as I’ve seen lots examples of things being done for quick wins, or tactical solutions further down the line, cause you more pain than they needed to, look out for my article coming soon about resolving ad-connect conflict errors.

Previous Post Next Post

Ω†Ω…ΩˆΨ°Ψ¬ Ψ§Ω„Ψ§ΨͺΨ΅Ψ§Ω„