I’ve made a powershell script which deploys and configures a windows 10 VM in on-prem vsphere using packer. After de build is completed I want this machine to be added to the citrix DAAS environment.
if I do this using the webportal everything is oke and everything works as it should.
However when I try adding the same Windows10 VM via PowerShell, it doesn’t work.
The VM is added to citrix DAAS, in the correct machine catalog & Delivery group but the power State displays an error message “Machine Not Found Possible Causes: Machine deleted or resource group ID missing”.
I hope someone has a fix or a pointer in the right direction, I’m at a loss…
My powershell:
# Citrix credentials
$citrixClientSecret = "<path>secureclient.csv"
Set-XDCredentials -CustomerID "<hidden>" -SecureClientFile $citrixClientSecret -ProfileType CloudApi -StoreAs "<hidden>" | out-null
Get-XDCredentials -ProfileName "<hidden>" | out-null
Get-XDAuthentication -ProfileName "<hidden>" | out-null
# Variables
$HypervisorConnectionUid = (Get-BrokerHypervisorConnection | Where-Object {($_.name -eq "myBrokerHypervisorConnection")}).Uid
$VDI_SID = (Get-ADComputer $VMNAME).SID
$VMNAME = "VDI-PS-033"
# Add machine to machine catalog
New-BrokerMachine -CatalogUid 107 -MachineName "<domain>$VMNAME" -HypervisorConnectionUid $HypervisorConnectionUid -HostedMachineId $VDI_SID
# add machine to delivery group
Add-BrokerMachine "<domain>$VMNAME" -DesktopGroup 32
Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.