Post

Archive - Teams Room User Create

To create a Teams Room user we have two possible way:

Microsoft script

Source https://docs.microsoft.com/en-us/microsoftteams/rooms/rooms-configure-accounts

At the buttom of the page

SkypeRoomProvisioningScript.ps1 https://go.microsoft.com/fwlink/?linkid=870105

If you use custom domain name instead of domain.onmicrosoft.com, you have to edit it at 1113 line

1
$sessSkype = New-CsOnlineSession -Credential $credSkype -OverrideAdminDomain "name.onmicrosoft.com"

Manual powershell command

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
### Variables
$newRoom="targyalo@mydomain.com"
$name="Targyalo szoba"
$pwd="Password1"
$license="mydomainname:MEETING_ROOM"
$location="HU"
$orgName="mydomain.onmicrosoft.com"
$mailTip="This room is"

####prerequisite
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module ExchangeOnlineManagement
Install-Module -Name MSOnline
Install-Module MicrosoftTeams
Install-Module -Name AzureAD
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Import-Module ExchangeOnlineManagement
Import-Module SkypeOnlineConnector



### Connecting to Microsoft Online Services 
Set-ExecutionPolicy RemoteSigned
$credential = Get-Credential
Connect-MsolService -Credential $credential

$sfboSession = New-CsOnlineSession -Credential $credential -OverrideAdminDomain $orgName
Import-PSSession $sfboSession
$credential = Get-Credential
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession -DisableNameChecking

### View your licenses avaialble
Get-MsolAccountSku

### Creating a new Account
New-Mailbox -MicrosoftOnlineServicesID $newRoom -Name $name -Room -RoomMailboxPassword (ConvertTo-SecureString -String $pwd -AsPlainText -Force) -EnableRoomMailboxAccount $true

### Wait one minute before configuring the new account
Set-MsolUser -UserPrincipalName $newRoom -PasswordNeverExpires $true -UsageLocation $location

### Assigning a license to the room account
Set-MsolUserLicense -UserPrincipalName $newRoom -AddLicenses $license

### Setting a MailTip for the Room
Set-Mailbox -Identity $newRoom -MailTip $mailTip

### Configs the account to process requests
Set-CalendarProcessing -Identity $newRoom -AutomateProcessing AutoAccept -AddOrganizerToSubject $false -RemovePrivateProperty $false -DeleteComments $false -DeleteSubject $false -AddAdditionalResponse $true -AdditionalResponse "Your meeting is now scheduled and if it was enabled as a Teams or Skype Meeting will provide a seamless click-to-join experience from the conference room." 

### Enabling the account for SfB Online - Find the pool first then use the name in -RegistratPool
Get-CsOnlineUser |ft RegistrarPool

### Wait a few minutes before running this next command
Enable-CsMeetingRoom -Identity $newRoom -SipAddressType "EmailAddress" -RegistrarPool "sippoolCWLGB101.infra.lync.com"

### Enable the account for Enterprise Voice
Set-CsMeetingRoom -Identity $newRoom -EnterpriseVoiceEnabled $true

#### Option Configuration 
### Getting Room Mailboxes ###
Get-Mailbox -RecipientTypeDetails RoomMailbox

### Finding and setting allowed external meeting invites from outside the domain
Get-Mailbox $name | Get-CalendarProcessing | Select *external*
Get-Mailbox $name | Set-CalendarProcessing -ProcessExternalMeetingMessages $true

### Checking the Meeting Room Configuration
Get-CsMeetingRoom -Identity "$newroom"
Get-Mailbox -Identity "$newroom" | fl

Add Teams room to existing room user

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### Variables
$newRoom="targyalo@mydomain.com"

###Modules
Install-Module MicrosoftTeams
Import-Module MicrosoftTeams
Connect-MicrosoftTeams
###Commands
Get-CsOnlineUser |ft RegistrarPool
Enable-CsMeetingRoom -Identity $newRoom -SipAddressType "EmailAddress" -RegistrarPool "sippoolCWLGB101.infra.lync.com"
### Enable the account for Enterprise Voice
Set-CsMeetingRoom -Identity $newRoom -EnterpriseVoiceEnabled $true
### Checking the Meeting Room Configuration
Get-CsMeetingRoom -Identity "$newroom"
Get-Mailbox -Identity "$newroom" | fl
This post is licensed under CC BY 4.0 by the author.