Using the Get-CsUser cmdlet you can get information about Lync users in your organization.

The below powershell command exports Lync users, sip address, Enterprise Voice Enabled and Line URI to a CSV file.

Get-Csuser | Select-Object DisplayName, SipAddress, EnterpriseVoiceEnabled, LineUri | Export-Csv -Path c:LyncUsers.csv