Properties Returned By Get-CsUser and Get-CsAdUser


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:

 

Get-CsUser

Get-CsAdUser

AddressListMembership

AltSecurityIdentities

ArchivingPolicy

Assistant

AudioVideoDisabled

City

ClientPolicy

ClientVersionPolicy

Company

ConferencingPolicy

 

CountryAbbreviation

CountryCode

CountryOrRegionDisplayName

CSEnabled

CSEnabled

Department

Description

DialPlan

DisplayName

DisplayName

DistinguishedName

EmployeeId

EnabledForRichPresence

EnterpriseVoiceEnabled

ExternalAccessPolicy

Comments (5)
  1. Desmond Lee says:

    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 🙂

    rgds,

  2. Anthony says:

    Good Info, thanks!  A question, when I query with CsAdUser for employeeID I get no results, though the field is definitely populated?

    Thank you.

  3. Justinian says:

    Get-CsUser also returns WhenCreated and WhenChaged attributes although they are only shown in the Get-CsADUser column of the table. Is there any particular reason for that?

  4. jamie says:

    Hey,

    Thanks for the post. I'm also having problems getting Get-CSADUser to return populated employeeID's. I can see the data in adsiedit but the cmdlet returns nothing. I'm seeing this with both the 2010 and 2013 cmdlets…

    Bug?

  5. Trap says:

    Get-CsAdUser doesn’t return EmployeeID as described. I opened a case with MS and they confirmed as much. Specifying -DomainController and FQDN solves it.

Comments are closed.

Skip to main content