UiPath Documentation
activities
latest
false
IT 自动化活动
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

为用户创建新的个人虚拟桌面

通过配置主机池、会话主机和应用程序组分配,为用户创建个人 Azure Windows 虚拟桌面。

下面的示例说明了如何使用 Azure WVD 活动为特定用户自动创建新的虚拟桌面。它显示了Windows 虚拟桌面作用域创建主机池获取应用程序组将用户和组分配到应用程序组向主机池添加虚拟机更新会话主机等活动。

该工作流包含以下操作:

  1. 连接到 Azure。
  2. 创建新的个人主机池。
  3. 将用户帐户分配给主机池的默认桌面应用程序组。
  4. 通过将现有虚拟机 (VM) 添加到主机池来创建新的会话主机。
  5. 将用户分配给会话主机。
  6. 向用户发送电子邮件,详细说明如何访问虚拟桌面。

1. 连接到 Azure

  • 添加“Windows 虚拟桌面作用域”活动,连接到 Azure 并为 Azure WVD 活动提供作用域。

  • Set a value for ClientID, ClientSecret (SecureString), Environment, SubscriptionID, and TenantID parameters.

2. 创建新的个人主机池

  • 添加“创建主机池”活动,创建类型为“个人”的主机池。在本例中,系统将为每个用户分配一个桌面。此活动将创建一个默认桌面应用程序组。

  • Set Type to Personal.

  • Set PersonalDesktopAssignmentType to Direct. In this case, you must later assign the user to both the host pool’s desktop application group and to a specific session host before the user can connect to the personal desktop.

  • Set a value for the mandatory parameters Name, ResourceGroupName, and Region.

  • To register the host pool's default desktop application group with the specified workspace, set a value for the Workspace parameter.

    备注:

    A desktop application group must be associated with a workspace in order for users to see the desktops published to them.

  • (Optional) Provide a value for FriendlyName, Description, and Tags parameters.

3. 将用户帐户分配给应用程序组

  • 添加“获取应用程序组”活动,以检索与主机池的默认桌面应用程序组关联的WVDApplicationGroup对象。

  • Set hostPoolInfo.DefaultDesktopApplicationGroupName to ApplicationGroupName.

  • Set hostPoolInfo.ResourceGroupName to ResourceGroupName.

  • 使用“将用户和组分配到应用程序组”活动将用户分配到桌面应用程序组。

    重要提示:

    为了使用“将用户和组分配到应用程序组”活动,在Windows 虚拟桌面作用域活动(客户端 ID 属性)中指定的客户端(应用程序)应具有此处所述的权限。例如,您可以按照 此处 描述的步骤,为应用程序组所属资源组的客户端(应用程序)分配 所有者 角色。

  • 通过将“用户和组 ID”设置为{"user-object-id"}来指定用户,其中user-object-id表示Azure AD中用户帐户的对象 ID 。可以从 Azure 门户或使用 UiPath.AzureActiveDirectory.Activities 包的“获取用户” 活动获取此值。

4. 创建新的会话主机

  • 虚拟机可以在 Azure 门户中创建,也可以使用 UiPath.Azure.Activities 包的“创建虚拟机” 活动创建。

  • Specify the Azure VM by setting a value for the parameters in the Virtual Machine category, namely Name and ResourceGroupName.

    提示:

    The VM’s status needs to be set to Running when using the Add Virtual Machine to Host Pool activity.

  • Specify the credentials of a domain user account that will be used to join the VM to the domain. If DomainToJoin is not set, the VM will be joined to the domain matching the suffix of the user principal name provided in the DomainUsername parameter.

  • The Add Virtual Machine to Host Pool activity runs for a long time, so it is recommended to set a Timeout of 1200 or longer to be sure it will complete (in case you want to wait for completion to perform other operations on the resulted session host).

5. 将用户分配给会话主机

  • 创建会话主机后,使用“更新会话主机”活动将用户分配给会话主机。

    备注:

    This step is required only when the host pool to which the session host belongs has the Direct assignment option enabled.

6. 向用户发送电子邮件

  • 使用发送 Outlook 邮件消息活动发送电子邮件,将新的个人虚拟桌面相关信息通知给用户。

  • 该电子邮件包含有关如何访问虚拟桌面的信息。

Run the process. The robot uses the Azure Windows Virtual Desktop activities to automate your Azure WVD tasks.

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新