Content
Table of Contents | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
You could add the new room by using PowerShell commands over the ExchangeOnline Module in PowerShell (2.1) or use the graphical interface in the M365 Admin Center (2.2)
2.1 PowerShell
a. Install or start Exchange Online PowerShell Module. You can install the Module directly in the PowerShell on your Computer:
Update your PowerShell to the latest version by using the following commands:
Code Block winget install --id Microsoft.Powershell --source winget
Please note that if you had PowerShell V5 before the new PowerShell V7 will be a new app on your PC, we recommend to use the version 7.x.
Now you can install the Module by the following commands:
Code Block Install-Module -Name ExchangeOnlineManagement
If you get an error message like the following, you have to allow PowerShell to run scripts:
Code Block Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
After the installation, we recommend to set the policy again to “restricted”:
Code Block Set-ExecutionPolicy -ExecutionPolicy restricted -Scope LocalMachine
You need to import the module :
Code Block Import-Module ExchangeOnlineManagement
b. Execute the following command and connect to your Microsoft365 using an admin account.
...
Code Block |
---|
New-DistributionGroup -Name RoomzResources -Alias RoomzResources -PrimarySmtpAddress RoomzResources@myorganization.com -Type security |
Apply an application access policy with the following command. Replace the myAppId with the Application (client) ID from the previous section. Replace RoomzResources with the name of the group you created.
Code Block |
---|
New-ApplicationAccessPolicy -AppId myAppId -PolicyScopeGroupId RoomzResources -AccessRight RestrictAccess -Description "Restricted ROOMZ Access" |
Fill this group with all room mailboxes. Don't forget to change the name of RoomzResources should you have used another name:
Code Block |
---|
Get-Mailbox| where {$_.RecipientTypeDetails -eq "RoomMailbox"} | foreach {Add-DistributionGroupMember -Identity RoomzResources -Member $_.UserPrincipalName} |
Or fill this group with specific room mailboxes. You have to execute the command for each room.
Code Block |
---|
Add-DistributionGroupMember -Identity "RoomzResources" -Member room1@roomz.io |
In order to reduce the propagation time required by Microsoft Azure, this command can accelerate the process:
Code Block |
---|
Update-DistributionGroupMember RoomzResources |
2.2 Graphical user interface
...