• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 116032, created on Apr 30, 2013, last review on Jun 5, 2015

  • Applies to:
  • Operations Automation


Important: import the LyncOnline PowerShell module to be able to use cmdlets provided in the article: Import-Module LyncOnline

How to get list of Lync users

The list of Lync users may be obtained using the Get-CsUser PowerShell cmdlet without any parameter: Get-CsUser
If you want to get properties of a particular Lync user provide its UPN: Get-CsUser <UPN> Replace <UPN> with the actual UPN (User Principal Name) of an user to get information about it.

The command below allows to retrieve the list of users of a particulat Lync tenant: Get-CsUser -Filter {TenantId -eq <TenantId>} Replace <TenantId> with the needed Lync tenant ID (see below how to find tenant ID).

Refer to the following article in the Microsoft TechNet library for more details about the Get-CsUser cmdlet - http://technet.microsoft.com/en-us/library/gg398125.aspx

How to get Lync tenant ID

Use one of the following PowerShell cmdlets to get Lync tenant ID.

1. Get tenant ID by Lync user UPN: (Get-CsUser <UPN>).TenantId
2. Get tenant ID by Organizational Unit: (Get-CsTenant –Identity <OU>).TenantId
3. Get tenant ID by a customer domain: (Get-CsTenant –Filter { Domains –eq <OrganizationDomain> }).TenantId

If the Get-CsTenant cmdlet returns empty list refer to the Knowledgebase article https://kb.odin.com/en/116033 for resolution.

caea8340e2d186a540518d08602aa065 5356b422f65bdad1c3e9edca5d74a1ae e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF