使用租户参数的 Skype for Business Online 中的 cmdletCmdlets in Skype for Business Online that use the Tenant parameter

 

修改公共提供商设置时,始终需要提供租户标识;即使只有一个租户,也是如此。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. 例如,此命令将 Windows Live 设置为允许用户与之通信的唯一公共提供程序:For example, this command sets Windows Live as the only public provider your users are allowed to communicate with:

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

幸运的是,在每次运行这些 cmdlet 时,都不需要键入租户 ID (例如,bf19b7db-6960-41e5-a139-2aa373474354) 。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. 相反,您可以通过运行 get-cstenant cmdlet,将租户 id 存储在一个变量中,然后在调用其他 cmdlet 之一时使用该变量来检索租户 id。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:

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

或者,您可以在单个命令中执行此操作,方法是检索租户 ID,然后将该值通过管道传递给 Set-CsTenantPublicProvider cmdlet:Alternatively, you can do this in a single command by retrieving the Tenant ID and then piping that value to the Set-CsTenantPublicProvider cmdlet:

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

调用 get-cstenant cmdlet 时无需指定租户 ID。You do not need to specify the tenant ID when calling the Get-CsTenant cmdlet. 此命令将返回有关你的租户的信息:This command returns information about your tenant:

Get-CsTenant

以下 cmdlet 接受租户标识。The following cmdlets accept a tenant identity. 但是,在这些情况下,参数是可选的,并且在调用 cmdlet 时不需要输入。However, in these cases, the parameter is optional and does not need to be entered when calling the cmdlet. 相反,Windows PowerShell 将根据你当前连接到的 Skype for Business Online 租户有效地为你输入租户标识:Instead, Windows PowerShell will effectively enter the tenant identity for you based on the Skype for Business Online tenant you are currently connected to:

例如,可以使用以下命令调用 CsTenantFederationConfiguration cmdlet:For example, the Get-CsTenantFederationConfiguration cmdlet can be called by using this command:

Get-CsTenantFederationConfiguration

尽管不是必需的,但您可以在调用 Get-CsTenantFederationConfiguration 时包含租户参数:Although not required, you can include the Tenant parameter when calling Get-CsTenantFederationConfiguration :

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

另请参阅See Also

Skype for Business Online 中的标识、范围和租户Identities, scopes, and tenants in Skype for Business Online
Skype for Business Online cmdletThe Skype for Business Online cmdlets