How to set a static IP on Windows Server (2019)

Set a static IP as usual:

To set a static IP address in Windows 7, 8, and 10:

  1. Click Start Menu > Control Panel > Network and Sharing Center or Network and Internet > Network and Sharing Center.
  2. Click Change adapter settings.
  3. Right-click on Wi-Fi or Local Area Connection.
  4. Click Properties.
  5. Select Internet Protocol Version 4 (TCP/IPv4).
  6. Click Properties.
  7. Select Use the following IP address.
  8. Enter the IP address, Subnet mask, Default gateway, and DNS server.
  9. Click OK.

Unfortunately, Windows Server does not show our assigned static IP.

If you type, you see that a different ip (marked as preferred) is used and our static IP is a duplicate:

C:\Users\Administrator> ipconfig /all

To fix it, enter this from Command Prompt:

C:\Users\Administrator> netsh interface ipv4 show inter


result as:

Idx Met MTU State Name
---  ----------  ----------  ------------  ---------------------------
  1          50  4294967295  connected     Loopback Pseudo-Interface 1
11          10        1500  connected     Local Area Connection      

11: <=Keep it in mind

Next run this command:            

C:\Users\Administrator>netsh interface ipv4 set interface 11 dadtransmits=0 store=persistent

Next, enter
Run > services.msc > disable DHCP Client service

Final, restart your server.

Source:

https://kb.netgear.com/27476/How-do-I-set-a-static-IP-address-in-Windows

https://social.technet.microsoft.com/Forums/ie/en-US/3e26affd-bb91-460a-b5fa-c7c0496c927c/how-to-disable-autoconfiguration-ipv4-?forum=winserverNIS

How to disable IP autoconfiguration in Core server
If you add a static IP in a core server, you may see that the auto configuration is on and giving a 169.0.0.0 number as the preferred address and the new static IP as the duplicate address. This will not work. When using a Core server, use the following steps to fix the issue.