Author Posts

May 11, 2016 at 8:04 am

We have a CSV list of Lync SIP logins (ex., but need to match this list with their Active Directory usernames and/or employeeID. GET-CSuser will not return the necessary AD variable. Anyone have any ideas? Thanks.


May 11, 2016 at 8:07 am

Could you not...

$sip = ""
$username = $sip -replace "",""
Get-ADUser -Identity $username


May 11, 2016 at 8:09 am

Maybe use the AD Module if SIP is the same as mail address?

Import-Csv .\LyncSip.csv | %{Get-ADUser -Filter "Mail -eq '$($_.sip)'"}

May 11, 2016 at 10:11 am

Sorry for the confusion...What we need from the list of sip addresses is to query AD for the actual AD usernames (specifically employeeid attribute) of the user. Some of the users do not have an email address (most do) that would match their sip address.

May 11, 2016 at 10:39 am

So, what's in the CSV? You said the SIP address was "" – is that not the username?

In other words, what's in the CSV, specifically, that you can match to something in AD?

May 11, 2016 at 10:41 am

Here is a sample I came up just to show the theory. Not exactly what you need but it could be a good start.

Import-Csv .\UserSips.csv |
%{Get-ADUser -Filter "msRTCSIP-PrimaryUserAddress -eq 'sip:$($_.sip)'" -Properties employeeID |
select employeeID}


Is that what you were looking for?

Edit: I must be a slow typist. Don is always 2 minutes ahead of me by the time I hit submit.