Citrix fixed an issue while creating desktop groups using the PowerShell cmdlet „New-XdDesktopGroup” after applying XenDesktop 4 SP1 on Desktop Delivery Controllers. It is strongly recommended to install DDCE400W2K3009. The emergency fix is available for 32Bit and 64Bit DDC’s.

This command creates a new VM-based desktop group, “testgrp”, containing three machines,
and published to all domain users.

$usr = New-XdUser 'domain users' -group
$cred = Get-Credential 'root'
$hs = New-XdHostingServer '' $cred

$machineName= 'machine1','machine2','machine3'
#find all the VM machines in the pool
$allvms = Get-XdHostedMachine $hs
#Find the workers and set the AD identity to the correct machine
$dsk = $machineName | foreach { $vm=$_; $allvms | where {$_.HostingName -match $vm } | foreach {$_.Name = $vm; $_ } }

$hgs = New-XdGroupHostingSettings $hs
$ng = New-XdDesktopGroup -pub 'testgrp' -desk $dsk -user $usr -hosting $hgs

You can download the latest XenDesktop 4.0 fixes from

Best Regards