Static MAC addresses for Windows 10/11 VMs created using RDS

Gareth Sweatman 0 Reputation points
2025-01-10T00:25:19.1566667+00:00

I have an environment that requires static MAC addresses and static IPs on everything. Lets say i create a collection in RDS called "Win10-VDI". In this collection there will be 10 VDI's. The first VDI name would be "Win10-VDI-1". This VDI must have a MAC address of 00:15:5D:00:00:01 and that MAC address would be reserved on the DHCP server to an IP of 192.168.1.101. Each following VDI would go up one number on the hostname, MAC and IP addresses. The issue i am having is trying to find a way, when RDS creates the VMs/VDIs, for it to assign the static MAC address BEFORE it turns on the first time and tries to pull an IP from the DHCP server. Unfortunately, in my environment, the Hostnames, IPs, and MAC address MUST ALWAYS match. As of right now, after updating our templates and redeploying the VDIs, we have to shut all of them down, run our powershell script to set all of the MAC addresses to the correct ones, log into the DHCP and clean up everything, and then turn all of the VDIs back on. Im trying to automate this because....well.... this gets really old. I have tried multiple ideas of automating this but nothing is working as we want it to. If anyone has any ideas. Please let me know.

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,676 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Karlie Weng 18,941 Reputation points Microsoft Vendor
    2025-01-10T05:58:36.2933333+00:00

    Hello,

    You may do it in sysprep:

    for example you can use WSIM to create a unattend.xml file, look like this just for example:

    <unattend>

    <settings pass="oobeSystem">

    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">

    <OOBE>

    <NetworkLocation>Work</NetworkLocation>

    <ProtectYourPC>1</ProtectYourPC>

    <MACAddressList>

    <MACAddress>00:1A:2B:3C:4D:5E</MACAddress>

    <MACAddress>00:1A:2B:3C:4D:5F</MACAddress>

    <!-- Add more MAC addresses as needed -->

    </MACAddressList>

    </OOBE>

    </component>

    </settings>

    </unattend>

    Also this is other document for preference : https://www.netiq.com/documentation/cloud-manager-2-5/ncm-reference/data/bm2t9v5.html#bm2t9v6 *Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information. *

    Location : MAC Address

    <fact name="vnic.mac" value="" type="String" />

    After you finished sysprep, you can have a good template to deploy MAC Address directly for your VDI.


    If the Answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.