Forum Discussion
Audi9112450
Jun 21, 2021Brass Contributor
Script to view users phone numbers or extensions in tenant
Hello, We are moving from Skype Online to Teams and we are assigning extensions to our users. Does anyone know of a simple script that can output "Username" and "Teams Phone Number or Teams Exte...
Audi9112450
Jun 24, 2021Brass Contributor
Hello Linus,
Thanks for the answer. That one liner does what I want it to do but strangely when I add the | Export-CSV -Path c:\mypath.csv to get it in an excel file it writes something in the file but it's all the same line for 20 000 lines.
Any idea how to get that info in readable form in a csv file?
Thanks 🙂
Thanks for the answer. That one liner does what I want it to do but strangely when I add the | Export-CSV -Path c:\mypath.csv to get it in an excel file it writes something in the file but it's all the same line for 20 000 lines.
Any idea how to get that info in readable form in a csv file?
Thanks 🙂
jangliss
Jul 01, 2021Iron Contributor
I think this is the result of using Format-Table as it creates a display object, not the data. I'd make a minor tweak to the code, and instead of format-table, I'd just use select-object.
Get-CsOnlineUser | Select UserPrincipalName,LineUri | Export-Csv -NoTypeInformation c:\temp\users.csv
Format-Table is great for presentation, but it can mess up when putting out to a file.
- Audi9112450Aug 18, 2021Brass ContributorHello,
It's been a while since I looked at this thread but alternatively is there a similar way to view what numbers I have assigned in my Skype On Prem tenant?
I'd like to be able to get an extract of who is using what number in Skype.
Thanks!- MikaelBohlinMar 16, 2022Brass ContributorYes, you can do the same using Get-CsUser on an on-prem Skype Server environment.