One potentially confusing feature of Microsoft Lync Server 2010 is the fact that there are two different cmdlets that can be used to return user account information: Get-CsUser and Get-CsAdUser. On the surface, the difference between the two cmdlets is pretty clear-cut:
· Get-CsUser is designed to return information only about your Active Directory user accounts that have been enabled for Lync Server.
· Get-CsAdUser is designed to return information about all your Active Directory user accounts, including both accounts that have been enabled for Lync Server and accounts that have not been enabled for Lync Server.
However, in addition to differing in the type of user accounts that are returned, the two cmdlets also differ in the user account attribute values that are returned; that can make a difference in deciding which cmdlet to use when faced with the task of returning user information. As a general rule, Get-CsAdUser returns only generic Active Directory attributes; that is, it returns information only for attributes that belong to all user accounts, regardless of whether or not those accounts have been enabled for Lync Server. By comparison, Get-CsUser returns attribute values for attributes related specifically to Lync Server. When a user account is enabled for Lync Server, a number of new attributes are added to that user account; if that account is later disabled for Lync Server those ‘extra” attributes are deleted. These are the attributes returned by Get-CsUser.
The following table compares the Active Directory attributes returned by the two cmdlets:
Thanks for sharing this information on the similarities yet differences between Get-CsUser and Get-CsAdUser. It did baffle us for a while, did it not :)
Good Info, thanks! A question, when I query with CsAdUser for employeeID I get no results, though the field is definitely populated?