Use set-csmeetingroom for assigning lineuri error


Trying to script the creation or migration of meeting rooms to Teams.  This would include assigning Lineuri for each room.

I can assign them in the GUI just fine.

(below is example with real data removed)

Set-CsMeetingRoom -Identity -lineuri tel:+12225551234 -locationID XXXXXXXX
Unable to set "LineURI". This parameter is restricted within Remote Tenant PowerShell.
+ CategoryInfo : InvalidArgument: (:) [Set-CsMeetingRoom], ManagementException
+ FullyQualifiedErrorId : LineURI,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsMeetingRoomCmdlet
+ PSComputerName :


running the set-csuser with the room identity gives the same error.

2 Replies
I'm not sure if I'm late with this but here is the solution :) You need to assign the phone number before you set the command enable-csmeetingroom. If you already have enabled a csmeeting room then you have to disable it (disable-csmeetingroom) then remove the license wait for a while and then assign the license again. After that you have to enter the commands in the correct order which is assigning the phone number first then you can do the other commands like enable-csmeetingroom ... I have reported that "bug" to MS and they just say they can reproduce the issue and advised me to create a new case for that.


We are having same issue. Teams Room was fine with LineURI assigned, however as part of Skype on-premises servers decomssion, we need to remove OnPrem LineURI and re-assign in Teams. All users' LineURIs assigned, however Teams Rooms LineURI getting error.