Topic Last Modified: 2013-08-13

When modifying your public provider settings, you always need to supply a Tenant identity; this is true even if you only have a single tenant. For example, this command sets Windows Live as the only public provider your users are allowed to communicate with:

Copy Code
Set-CsTenantPublicProvider -Tenant "bf19b7db-6960-41e5-a139-2aa373474354" -Provider "WindowsLive"

Fortunately, you do not need to type the Tenant ID (for example, bf19b7db-6960-41e5-a139-2aa373474354) each time you run one of these cmdlets. Instead, you can retrieve the Tenant ID by running the Get-CsTenant cmdlet, storing the Tenant ID in a variable, and then using that variable when you call one of the other cmdlets. For example:

Copy Code
$x = (Get-CsTenant).TenantId
Set-CsTenantPublicProvider -Tenant $x -Provider "WindowsLive"

Alternatively, you can do this in a single command by retrieving the Tenant ID and then piping that value to the Set-CsTenantPublicProvider cmdlet:

Copy Code
Get-CsTenant | Select-Object TenantId | ForEach-Object {Set-CsTenantPublicProvider -Tenant $_.TenantId -Provider "WindowsLive"}

You do not need to specify the tenant ID when calling the Get-CsTenant cmdlet. This command returns information about your tenant:

Copy Code
Get-CsTenant

The following cmdlets accept a tenant identity. However, in these cases, the parameter is optional and does not need to be entered when calling the cmdlet. Instead, Windows PowerShell will effectively enter the tenant identity for you based on the Lync Online tenant you are currently connected to:

For example, the Get-CsTenantFederationConfiguration cmdlet can be called by using this command:

Copy Code
Get-CsTenantFederationConfiguration

Although not required, you can include the Tenant parameter when calling Get-CsTenantFederationConfiguration :

Copy Code
Get-CsTenantFederationConfiguration -Tenant "bf19b7db-6960-41e5-a139-2aa373474354"

See Also