Export Office 365 Skype for Business phone number list & usernames to Excel spreadsheet

How can I export the Office 365 Skype for Business phone number list which usernames are assigned to which phone numbers to an Excel spreadsheet or a .CSV file?

Skype-For-Business-Phone numbers
IT GuyNetwork EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vasil Michev (MVP)Commented:
PowerShell is the only option:

Get-CsOnlineUser -Filter { EnterpriseVoiceEnabled -eq $true } | select DisplayName,UserPrincipalName,LineURI | Export-CSV -nti blabla.csv

Open in new window


If you need help connecting to SfBO PowerShell: https://technet.microsoft.com/en-us/library/dn362795(v=ocs.15).aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vasil Michev (MVP)Commented:
Whoops, seems I misread the question, I though you are asking for the user's phone numbers....

Get-CsOnlineTelephoneNumber | select FriendlyName,Id,ActivationState,CityCode,Location,O365Region,UserId | export-csv -nti blabla.csv

Open in new window

0
IT GuyNetwork EngineerAuthor Commented:
I want to be able to export a list of which users are assigned which phone numbers.

Is that something that these scripts will do?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Vasil Michev (MVP)Commented:
Yup, both variants should return that info.
0
IT GuyNetwork EngineerAuthor Commented:
Vasil,

When I copy and paste the commands that you have provided into either the Microsoft Azure Active Directory Module for Windows PowerShell or the Windows PowerShell (which are both being run as administrator and are both logged into Office 365 using the global admin account) I receive the errors shown below.

What do I need to do to fix this so that I can run this command successfully?

PS C:\Users\Administrator\Desktop> Get-CsOnlineUser -Filter { EnterpriseVoiceEnabled -eq $true } | select DisplayName,Us
erPrincipalName,LineURI | Export-CSV -nti blabla.csv
Get-CsOnlineUser : The term 'Get-CsOnlineUser' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Get-CsOnlineUser -Filter { EnterpriseVoiceEnabled -eq $true } | selec ...
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-CsOnlineUser:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\Administrator\Desktop> Get-CsOnlineTelephoneNumber | select FriendlyName,Id,ActivationState,CityCode,Locatio
n,O365Region,UserId | export-csv -nti blabla.csv
Get-CsOnlineTelephoneNumber : The term 'Get-CsOnlineTelephoneNumber' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ Get-CsOnlineTelephoneNumber | select FriendlyName,Id,ActivationState, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-CsOnlineTelephoneNumber:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\Administrator\Desktop>

PowerShell-errors
0
IT GuyNetwork EngineerAuthor Commented:
What special PowerShell module do I need to load so that these commands that Vasil has provided will work?

Or do I need to type in any special Powershell commands after logging into the Office PowerShell using my Office 365 global admin account?
0
Vasil Michev (MVP)Commented:
You need to follow the steps in the article I linked in the first post...
0
IT GuyNetwork EngineerAuthor Commented:
Vasil,

I have been able to successfully load the Skype for Business module and now these PowerShell commands run successfully.

Now can you please provide me with the PowerShell command that will list all of our Skype for Business phone numbers (in numerical order from lowest to highest) in column A and then list the user's full name (first and last name) in column B?

Currently, only 10 out of the 60 users within our organization have Skype for Business phone numbers associated with their Office 365 accounts so for the phone numbers that aren't yet associated with any users we just need the phone number to display within this spreadsheet. We have purchased 60 phone Skype for Business phone numbers but just haven't assigned them to all of our Office 365 users yet.

If you have any questions about this please let me know.
0
Vasil Michev (MVP)Commented:
You can get all the information you need from the above cmdlets, surely it's not that hard to copy/paste them into a new file?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.