-
-
-
-
Broker PowerShell SDK 命令
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
代理 PowerShell 开发工具包命令
您可以使用代理 PowerShell 开发工具包为交付组配置 Autoscale。要使用 PowerShell 命令配置 Autoscale,您必须使用 PowerShell 开发工具包版本 7.21.0.12 或更高版本。有关 PowerShell 开发工具包的更多信息,请参阅 SDK 和 API。
Set-BrokerDesktopGroup
禁用或启用现有 BrokerDesktopGroup 或更改其设置。有关此 cmdlet 的更多信息,请参阅 https://citrix.github.io/delivery-controller-sdk/Broker/Set-BrokerDesktopGroup/。
示例
有关如何使用 PowerShell cmdlet 的详细信息,请参阅以下示例。
启用自动缩放
- 假设您要为名为“MyDesktop”的交付组启用 Autoscale。请使用
Set-BrokerDesktopGroupPowerShell 命令。例如:PS C:\> Set-BrokerDesktopGroup "MyDesktop" -AutoscalingEnabled $true
分别配置高峰时段和非高峰时段的容量缓冲区
- 假设您要为名为“MyDesktop”的交付组将高峰时段的容量缓冲区设置为 20%,非高峰时段设置为 10%。请使用
Set-BrokerDesktopGroupPowerShell 命令。例如:PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PeakBufferSizePercent 20 -OffPeakBufferSizePercent 10
配置 断开连接超时 设置
- 假设您要为名为“MyDesktop”的交付组将高峰时段的 when disconnected timeout 值设置为 60 分钟,非高峰时段设置为 30 分钟。请使用
Set-BrokerDesktopGroupPowerShell 命令。例如:PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PeakDisconnectTimeout 60 -OffPeakDisconnectTimeout 30
配置 注销超时 设置
- 假设您要将名为“MyDesktop”的交付组的 注销超时 值设置为高峰时段 60 分钟,非高峰时段 30 分钟。使用
Set-BrokerDesktopGroupPowerShell 命令。例如:PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PeakLogOffTimeout 60 -OffPeakLogOffTimeout 30
配置 关机延迟 设置
- 假设您要将名为“MyDesktop”的交付组的关机延迟设置为 15 分钟。使用
Set-BrokerDesktopGroupPowerShell 命令。例如:PS C:\> Set-BrokerDesktopGroup "MyDesktop" -PowerOffDelay 15
配置一个在此期间关机延迟不会生效的时间段。
- 假设您希望名为“MyDesktop”的交付组的关机延迟在 30 分钟后生效。使用
Set-BrokerDesktopGroupPowerShell 命令。例如:-
C:\PS> Set-BrokerDesktopGroup "MyDesktop" -SettlementPeriodBeforeAutoShutdown 30。
-
配置 计算机实例成本 设置
- 假设您要将名为“MyDesktop”的交付组的每小时计算机实例成本设置为 0.2 美元。使用
Set-BrokerDesktopGroupPowerShell 命令。例如:PS C:\> Set-BrokerDesktopGroup "MyDesktop" -MachineCost 0.2
New-BrokerPowerTimeScheme
为交付组创建 BrokerPowerTimeScheme。有关详细信息,请参阅 https://citrix.github.io/delivery-controller-sdk/Broker/New-BrokerPowerTimeScheme/。
示例
假设您想为 UID 值为 3 的交付组创建电源时间方案。新方案涵盖周末、周一和周二。上午 8:00 到下午 6:30 的时间段定义为方案中包含的日期的高峰时段。在高峰时段,池大小(保持开机的计算机数量)为 20。在非高峰时段,池大小为 5。您可以使用 Set-BrokerDesktopGroup PowerShell 命令。例如:
PS C:\> $ps48=(0..47 | %{ if ($_ -lt 16 -or $_ -gt 37) { 5 } else { 20 } } )PS C:\> $pt48=(0..47 | %{ if ($_ -lt 16 -or $_ -gt 37) { $false } else { $true } } )PS C:\> New-BrokerPowerTimeScheme -Name 'First Half Week' -DaysOfWeek Weekend,Monday,Tuesday -DesktopGroupUid 3 -PeakHalfHours $pt48 -PoolSize $ps48
用于动态会话超时的参数
以下 Broker PowerShell SDK cmdlet 已扩展,支持多个新参数,以实现动态会话超时:
- 获取代理桌面组
- 新建代理桌面组
- 设置-代理桌面组
这些参数包括:
-
DisconnectPeakIdleSessionAfterSeconds – 表示在高峰时段空闲会话断开连接后的秒数。此属性的默认值为 0,表示在高峰时段禁用其关联行为。大于 0 的值仅在高峰时段为交付组启用其行为。
-
DisconnectOffPeakIdleSessionAfterSeconds - 表示在非高峰时段空闲会话断开连接后的秒数。此属性的默认值为 0,表示在非高峰时段禁用其关联行为。大于 0 的值仅在非高峰时段为交付组启用其关联行为。
-
LogoffPeakDisconnectedSessionAfterSeconds - 表示在高峰时段断开连接的会话终止后的秒数。此属性的默认值为 0,表示在高峰时段禁用其关联行为。大于 0 的值仅在高峰时段为交付组启用其关联行为。
-
LogoffOffPeakDisconnectedSessionAfterSeconds - 表示在非高峰时段断开连接的会话终止后的秒数。此属性的默认值为 0,表示在非高峰时段禁用其关联行为。大于 0 的值仅在非高峰时段为交付组启用其关联行为。
示例
假设您想为名为“MyDesktop”的交付组在高峰时段将空闲会话超时设置为 3,600 秒。使用 Set-BrokerDesktopGroup PowerShell 命令。例如:
C:\PS> Set-BrokerDesktopGroup "MyDesktop" -DisconnectOffPeakIdleSessionAfterSeconds 3600
这样做会断开名为“MyDesktop”的桌面组中在非高峰时段已空闲超过 1 小时的会话。
共享
共享
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.