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

Fax

FirstName

Guid

HomePhone

HomeServer

HostedVoiceMail

HostedVoicemailPolicy

HostingProvider

Id

Identity

Identity

Info

Initials

IPPBXSoftPhoneRoutingEnabled

IPPhone

IsValid

LastName

LineServerURI

LineURI

LocationPolicy

Manager

MiddleName

MobilePhone

Name

ObjectCategory

ObjectCategoryCN

ObjectClass

ObjectState

Office

OriginatingServer

OriginatorSid

 

OtherFax

OtherHomePhone

OtherIPPhone

OtherMobile

OtherPager

OtherTelephone

Pager

PasswordLastSet

Phone

PinPolicy

PostalCode

PostOfficeBox

PreferredLanguage

PresencePolicy

PrimaryGroupId

PrivateLine

ProxyAddresses

RegistrarPool

RemoteCallControlTelephonyEnabled

SamAccountName

SamAccountName

Sid

SidHistory

SipAddress

SipAddress

StateOrProvince

Street

StreetAddress

TargetHomeServer

TargetRegistrarPool

TenantId

TenantId

Title

Url

UserAccountControl

UserPrincipalName

UserPrincipalName

VoicePolicy

WebPage

WhenChanged

WhenCreated

WindowsEmailAddress

                                                                               

                                                                               

Comments (2)

  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.

Skip to main content