Pages Menu
TwitterRssFacebook

Posted by on Mar 1, 2013 in Development | 0 comments

Powershell/.NET AD Search Request for Lync objects without using AD Module

Powershell/.NET AD Search Request for Lync objects without using AD Module

This is more of an aide-memoir than anything else, but if you need to get user details, including Microsoft Lync SIP Address and Home Server and you can’t use Powershell Active Directory Module, then these are the Attribute Names you need to use to query the Lync Extended Attributes using the System.DirectoryServices.Protocols.SearchRequest class.

(and I wanted to play with Gist). Initially, I couldn’t find the correct names to use to pull out the SIP Address and Home Server. I’d already written something to get back users:

and was getting the information I need back using this:

but it wasn’t working when I added msRTCSIP-PrimaryUserAddress  into the Attributes list. I found out that if you left out the Attributes.Add entries completely, and didn’t have any, you got back all the Attributes. That meant I could scan the list, and find out that what I should be looking for was msrtcsip-primaryuseraddress – turns out it’s case-sensitive.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This site uses cookies to help make this website better. By continuing to use this site we’ll assume you’re OK with that (implied consent).