Citrix Virtual Apps and Desktops

本地 Active Directory 服务帐户

本地 Active Directory 服务帐户是一个容器,用于存储特权域用户帐户的用户名和密码。该用户帐户必须具有足够的权限来管理 Active Directory 中的计算机帐户。计算机创建服务可以使用此服务帐户执行与计算机帐户相关的操作,而无需每次都输入域凭据。

创建本地 Active Directory 服务帐户

使用 Studio 或 PowerShell 创建本地 Active Directory 服务帐户。

先决条件

要创建本地 Active Directory 服务帐户,请务必完成以下任务:

  • 在您的 Active Directory 中创建一个域用户帐户,该帐户具有足够的权限来创建、更新和删除您的 Active Directory 或特定 OU 中的计算机对象。

使用 Web Studio

  1. 在左侧窗格中,选择 “管理员”
  2. “服务帐户” 选项卡中,单击 “创建服务帐户”
  3. “身份类型” 页面上,选择 “本地 Active Directory”。单击 “下一步”
  4. “凭据” 页面上,单击 “输入凭据” 以提供您要用作服务帐户的特权域用户帐户的用户名和密码。
  5. 设置密码过期日期,或将其保留为永不过期。
  6. 为此服务帐户选择一个或多个范围。
  7. 为服务帐户输入一个友好名称和描述(可选)。
  8. 单击 “完成” 以完成创建。

使用 PowerShell

您可以使用 PowerShell 命令创建本地 Active Directory 服务。例如:

$credential = ConvertTo-SecureString -String $password -AsPlainText -Force
New-AcctServiceAccount -IdentityProviderType ActiveDirectory -IdentityProviderIdentifier test.local -AccountId test\svcacct_mcs -AccountSecret $credential -SecretExpiryTime 2030/08/15 -DisplayName 'scvacct_mcs' -Description 'Service account for test.local'
<!--NeedCopy-->

注意:

$password 是所提供的域用户帐户的匹配密码。

执行计算机身份相关操作

在 Active Directory 或基于 Microsoft Entra 混合的身份池与服务帐户关联后,您可以执行各种计算机身份相关操作,而无需输入域凭据。

  • 使用服务帐户创建新的身份帐户

     New-AcctADAccount -IdentityPoolName MyPool -Count 2 -UseServiceAccount
     <!--NeedCopy-->
    
  • 使用服务帐户修复身份帐户

     Repair-AcctADAccount -ADAccountName "Domain\account","Domain\account2" -UseServiceAccount
     <!--NeedCopy-->
    
  • 使用服务帐户删除身份帐户

     Remove-AcctADAccount -IdentityPoolName MyPool -RemovalOption Delete -ADAccountName "Domain\account","domain\account2" -UserServiceAccount
     <!--NeedCopy-->
    

后续步骤

本地 Active Directory 服务帐户