大网数据广告活动
远程桌面与会话

Manage a personal desktop session collection in RDS

· 52CE 我爱测

Learn how to manage a personal desktop session collection in Remote Desktop Services.

Use the following information to manage a personal desktop session collection in Remote Desktop Services.

Manually assign a user to a personal session host

Use the Set-RDPersonalSessionDesktopAssignment cmdlet to manually assign a user to a personal session host server in the collection. The cmdlet supports the following parameters:

-CollectionName <string>

-ConnectionBroker <string>

-User <string>

-Name <string>

  • –CollectionName - specifies the name of the personal session desktop collection. This parameter is required.
  • –ConnectionBroker - specifies the Remote Desktop Connection Broker (RD Connection Broker) server for your Remote Desktop deployment. If you don't supply a value, the cmdlet uses the fully qualified domain name (FQDN) of the local computer.
  • –User - specifies the user account to associate with the personal session desktop, in DOMAIN\User format. This parameter is required.
  • –Name - specifies the name of the session host server. This parameter is required. The session host identified here must be a member of the collection that the -CollectionName parameter specifies.

The Import-RDPersonalSessionDesktopAssignment cmdlet imports associations between user accounts and personal session desktops from a text file. The cmdlet supports the following parameters:

-CollectionName <string>

-ConnectionBroker <string>

-Path <string>

–Path specifies the path and file name of a file to import.

Removing a User Assignment from a Personal Session Host

Use the Remove-RDPersonalSessionDesktopAssignment cmdlet to remove the association between a personal session desktop and a user. The cmdlet supports the following parameters:

-CollectionName <string>

-ConnectionBroker <string>

-Force

-Name <string>

-User <string>

–Force forces the command to run without asking for user confirmation.

Query user assignments

Use the Get-RDPersonalSessionDesktopAssignment cmdlet to get a list of personal session desktops and associated user accounts. The cmdlet supports the following parameters:

-CollectionName <string>

-ConnectionBroker <string>

-User <string>

-Name <string>

You can run the cmdlet to query by collection name, user name, or by session desktop name. If you specify only the –CollectionName parameter, the cmdlet returns a list of session hosts and associated users. If you also specify the –User parameter, the session host associated with that user is returned. If you provide the –Name parameter, the user associated with that session host is returned.

The Export-RDPersonalPersonalDesktopAssignment cmdlet exports the current associations between users and personal virtual desktops to a text file. The cmdlet supports the following parameters:

-CollectionName <string>

-ConnectionBroker <string>

-Path <string>

All new cmdlets support the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 7/3/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。