Reporting LYNC SIP Address with User Names using AD PowerShell
Requirement:
How to Query Active Directory to get SIP Address and User Name?
Solution:
LYNC - Get-CsUSer
AD (Quest) = Get-QADuser -Id '1234' | Select -ExpandProperty ProxyAddresses | Select-String -Pattern "SIP:"
We need a CSV report with SIP address, name, SamAccountName and office detail. Not a big challenge but little effort is required:
Get-QADUser -SizeLimit 0 -Service "DCNAME" | Select DisplayName , SamAccountName , PrimarySMTPAddress , Office , @{Name='proxyaddresses';Expression={($_.proxyaddresses | Select-String -Pattern "SIP:")}} | Export-Csv C:\Temp\SIPReport.csv -NoTypeInformation -Encoding UTF8 |
Manipulate using @{Name='proxyaddresses';Expression={($_.proxyaddresses | Select-String -pattern "SIP:"}}
Modify as you wish and enjoy PowerShell.