Topic Last Modified: 2013-02-22

Returns information about the Lync Online tenants that have been configured for use in your organization. Tenants represent groups of online users. In many cases, you might need only a single tenant. However, if different groups of users have different management needs, Lync Online provides support for a single organization having multiple tenants.

Get-CsTenant can only be used with Lync Online.


Get-CsTenant [[-Identity] <OUIdParameter>] [-Filter <String>] [-ResultSize <Unlimited`1>] [-Verbose]


Example 1

The command shown in Example 1 returns information about all the tenants configured for use in the organization.

Copy Code

Example 2

In Example 2, information is returned for a single tenant: the tenant with the Identity "bf19b7db-6960-41e5-a139-2aa373474354".

Copy Code
Get-CsTenant -Identity "bf19b7db-6960-41e5-a139-2aa373474354"

Example 3

The preceding command shows an alternate way to return information for a single tenant; in this example, that's done by including the Filter parameter and the filter value {DisplayName –eq "Fabrikam"}. That syntax returns information only for the tenant that has the display name Fabrikam.

Copy Code
Get-CsTenant -Filter {DisplayName -eq "Fabrikam"}

Example 4

The command shown in Example 4 returns information for all the tenants that have a ServiceInstance equal to "LitwareincCommunicationsOnline/San Antonio". To do this, the command includes the Filter parameter and the filter value {ServiceInstance -eq "LitwareincCommunicationsOnline/San Antonio"}. That filter value limits returned data to tenants that have a ServiceInstance property equal to (-eq) "LitwareincCommunicationsOnline/San Antonio".

Copy Code
Get-CsTenant -Filter {ServiceInstance -eq "LitwareincCommunicationsOnline/San Antonio"}

Example 5

Example 5 returns information for all tenants that have a country or region display name equal to Australia. This is done by using the Filter parameter and the parameter value {CountryOrRegionDisplayName -eq "Australia"}.

Copy Code
Get-CsTenant -Filter {CountryOrRegionDisplayName -eq "Australia"}

Detailed Description

In Lync Online, tenants represents groups of users who have accounts homed on the service. Many organizations will require only a single tenant in which to house all their user accounts. However, Lync Online management is often performed on a tenant-by-tenant basis; that means that all the users in the same tenant will have the same voice policy, the same federation configuration settings, and so on. If you need to manage some users in one way and other users in another way, you might consider using multiple tenants, each with its own collection of policies and settings.

Regardless of the number of tenants you have, you can return information about these tenants by using the Get-CsTenant cmdlet.


Parameter Required Type Description




Enables you to return data by using Active Directory attributes and without having to specify the full Active Directory distinguished name. For example, to retrieve a tenant by using the tenant display name, use syntax similar to this:

Get-CsTenant –Filter {DisplayName –eq "FabrikamTenant"}

To return all tenants that use a Fabrikam domain use this syntax:

Get-CsTenant –Filter {Domains –like "*fabrikam*"}

The Filter parameter uses the same Windows PowerShell filtering syntax is used by the Where-Object cmdlet.

You cannot use both the Identity parameter and the Filter parameter in the same command.




Active Directory distinguished name of the tenant. For example:

-Identity "OU=bf19b7db-6960-41e5-a139-2aa373474354,OU=OCS Tenants,dc=litwareinc,dc=com"

If you do not include either the Identity or the Filter parameter then the Get-CsTenant cmdlet will return information about all your tenants.




Enables you to limit the number of records returned by the cmdlet. For example, to return seven tenants (regardless of the number of tenants that are in your forest) include the ResultSize parameter and set the parameter value to 7. Note that there is no way to guarantee which 7 users will be returned.

The result size can be set to any whole number between 0 and 2147483647, inclusive. If set to 0 the command will run, but no data will be returned. If you set the tenants to 7 but you have only three contacts in your forest, the command will return those three tenants and then complete without error.

Input Types

The Get-CsTenant cmdlet accepts pipelined instances of the Microsoft.Rtc.Management.ADConnect.Schema.TenantObject object as well as string values representing the Identity of a Lync Online tenant (for example "OU=bf19b7db-6960-41e5-a139-2aa373474354,OU=OCS Tenants,dc=vdomain,dc=com").

Return Types

The Get-CsTenant cmdlet returns instances of the Microsoft.Rtc.Management.ADConnect.Schema.TenantObject object.

See Also