Forum Discussion
Markus_Johansson
Sep 09, 2022Iron Contributor
How to retrieve all Teams enabled rooms with powershell
Hey. Seems Get-CsMeetingRoom has been depricated. How to retrieve all Teams enabled meeting rooms with powershell?
- Oct 04, 2022
Hi,
You can use Graph API :
$uri = "https://graph.microsoft.com/beta/teamwork/devices?$filter=deviceType eq 'TeamsRoom'"$RoomsList = (Invoke-RestMethod -Uri $uri -Headers $authTokenTeams -Method Get).valuehttps://learn.microsoft.com/en-us/graph/api/teamworkdevice-list?view=graph-rest-beta&tabs=httpNeed to create an app registration to get an authtoken, i've used the powershell Intune samples scripts to request authToken, just need to change $clientID in Get-AuthToken function to match your App Registration in the 😉 https://github.com/microsoftgraph/powershell-intune-sampleshttps://github.com/microsoftgraph/powershell-intune-samples
Markus_Johansson
Oct 14, 2022Iron Contributor
Thanks, also found this article.
https://pnp.github.io/blog/post/manage-teams-devices-in-graph/
https://pnp.github.io/blog/post/manage-teams-devices-in-graph/
Markus_Johansson
Jan 23, 2023Iron Contributor
Seems this one works now.
Get-MgBetaTeamworkDevice -all
Get-MgBetaTeamworkDevice -all