How to add machine to existing Machine Catalog and Delivery Group using PowerShell

How to add machine to existing Machine Catalog and Delivery Group using PowerShell

book

Article ID: CTX550420

calendar_today

Updated On:

Description

This article is designed to describe how to add a machine to an existing Machine Catalog and Delivery Group using PowerShell.


Instructions

Open PowerShell with "run as administrator" on any DDC, then create AD account name and add it to Machine Catalog by the following commands.
1. Load our snapins

asnp citrix*
image.png

2. Create a new account for the machine we want to add "pool name" should match the catalog name

get-brokercatalog | select catalogname, uid

New-AcctADAccount -IdentityPoolName "Pool Name" -count n (if AD accounts haven't created in AD)

Example :-New-AcctADAccount -IdentityPoolName "Desktop-Static-MCS" -count 1
image.png
or Add-AcctADAccount -IdentityPoolName "Pool Name" -ADAccountName "Domain\COMPUTERNAME" (if AD accounts have already created in AD)

Example:- Add-AcctADAccount -ADAccountName "TINA\WIN10-MSC002" -IdentityPoolName "Desktop-Static-MCS"

image.png

3. Find the provisioning scheme associated with the catalog you want to add the machine to -  Get-provscheme | select ProvisioningSchemeName 

4. Create VM specifying the provisioning scheme in the above command using New-provVM -ADAccountName "Domain\VDA NetBIOS Name" -ProvisioningSchemeName "poolname"

Example:- New-ProvVM -ADAccountName "TINA\WIN10-MSC003" -ProvisioningSchemeName "Desktop-Static-MCS"
image.png

5. Add VM to Machine Catalog using New-brokermachine -CatalogUid n -MachineName "Domain\VDA NetBIOS Name"

Example:- New-BrokerMachine -CatlogUid 2 -MachinenName "TINA\WIN10-MSC002"
image.png

6. Add VM to Delivery Group and add user permission using

  • Add-BrokerMachine -MachineName "Domain\Computer" -DesktopGroup "DeliveryGroup"
  • Add-BrokerUser -Name "Domain\username" -Machine "Domain\ComputeName"

Example:-

Add-BrokerMachine -MachineName "TINA\WIN10-MSC002" -DesktopGroup "Desktop-Static-MCS"

Add-BrokerUSer -Name "TINA\ghw" -Machine "TINA\WIN10-MSC002"

image.png


7. Then you would see VDA on Studio
image.png