Nick Panaccio
06/01/2024, 12:23 PM$VDAs = Get-Content .\VDAs.txt
$SourceCatalogName = "OldCatalog"
$InputFile = Get-BrokerMachine -CatalogName $SourceCatalogName -MaxRecordCount 100000 | Where { $_.HostedMachineName -in $VDAs } | Export-Clixml ".\Migration.xml"
$VMs = Import-Clixml -Path $InputFile
$HostingConnectionDetail = Get-BrokerHypervisorConnection | Where { $_.Name -eq "NewHostingConnection" }
$Catalog = Get-BrokerCatalog -Name "NewCatalog"
#Turn on Maintenance Mode
Set-BrokerMachine -MachineName $VM.MachineName -InMaintenanceMode $true
#Remove from the existing Delivery Group
Remove-BrokerMachine -MachineName $VM.MachineName -DesktopGroup $VM.DesktopGroupName
#Remove from the existing Machine Catalog
Remove-BrokerMachine -MachineName $VM.MachineName
#Add to the new Machine Catalog
New-BrokerMachine -CatalogUid $Catalog.Uid -HostedMachineId $VM.HostedMachineId -HypervisorConnectionUid $HostingConnectionDetail.Uid -MachineName $VM.SID
#Add to the Delivery Group (same as previous one)
Add-BrokerMachine -MachineName $VM.MachineName -DesktopGroup $DeliveryGroupName
The script completes successfully, and I see the VDA in Citrix Cloud in the correct MC and DG, and the VDA registers. However, the Power State shows as Unknown. If I query the VDA using Get-BrokerMachine, one thing I immediately notice is that certain fields are blank, like HostedMachineName and HostingServerName. I have to be missing something obvious, and I've stared at this long enough where I need another set of eyes. Any chance somebody sees where I'm going wrong here?Nick Panaccio
06/01/2024, 1:58 PMNick Panaccio
06/01/2024, 1:59 PMNick Panaccio
06/01/2024, 2:08 PMRachel Berry
06/03/2024, 1:22 PM