You may need to configure the Remote Desktop Services Host Virtual IP configuration.

If you have single, or non-pvs provisioned Citrix servers, then ignore this post

You can do this on the image, but it will wipe when you reboot.

You can also do this via group-policy, but it will get wiped on boot.

This is becaus it’s based off of the MAC address of the NIC. If all your servers, as they do, have a unique MAC…how on earth earth are you meant to do it?!


Thankfully, because it’s a registry-entry string, we can configure a powershell script to on-boot, grab the info. Here is arough layout of what we need to do:

  1. Get a registry file with our required settings

  2. Ascertain the MAC address of the VM

  3. Replace the MAC in the registry file with our VM mac

  4. Get the server to apply the registry file on boot

Get a registry file with our required settings

  • In your VM, browse start > admin tools > Remote Desktop Services > Remote Desktop Session Host Configuration

  • Double-click “IP Virtualization”m set to enabled, select your NIC, and sleect “Per Program” or “Per Session”


Now, browse to HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\TSAppSrv

Right-click “VirtualIP” > “export”


Save your registry file to a central location

2. & 3. Ascertain MAC address of VM, and find-and-replace in registry file

Modify your reg-file, replace the MAC address with REPLACEME:


Both steps combined uses some powershell logic. Pretty straight-forward to follow:

$pcname = $ENV:computername
if ($pcname -like "\*P2\*" -or $pcname -like "\*BASE\*"){
#P2 is based off of a LMG2 group that we use, BASE servers are our update servers for testing. Modify to suit. In my situation, we don't want every PVS server to get this setting

\# mac magic

$mac = get-wmiobject win32\_networkadapter | where-object {$\_.ServiceName -like "\*vmxnet\*" -and $_.MacAddress -ne $null}
$macaddr = $mac.macaddress -replace ":", "-"

\# reg file

cp \\fileserver\Scripts\OnStartup\virtualip.reg c:\temp\
\# We copy to C: drive, as it's custom for each provisioned PVS server.

$reg = Get-Content c:\temp\virtualip.reg
$reg -replace "replaceme", "$macaddr" | Set-Content c:\temp\virtualip.reg
regedit.exe /S c:\temp\virtualip.reg

4. Apply regfile on boot

Pretty easy, create a scheduled task to run that powershell script on boot.

Done! Now all of your servers will have IP-virtualization enabled on boot.