No module Published on Offcanvas position

Windows Server Core "Failed to release DHCP Lease"

When you try to configure a new static IP for your Windows Server Core instance, there are occassions where you might encounter the following error:
Error:
Setting NIC to static IP…
Failed to release DHCP lease.
Result code: 83
Method name: ReleaseDHCPLease

The fix to this is very easy:

  1. Launch powershell
  2. Enter the following command: Get-NetAdapter
    Take note of the Name column, if you have multiple adapters, take note of the one that needs to has its's IP adres changed.
    Can't figure out which adapter it is?
    First figure out which IP adress the adapter is using now, use ipconfig for this
    Second, use the following command: Get-NetIPAddress | Select-Object InterfaceAlias, IPAddress
    Take note of the InterfaceAlias name that matches the used IP address.
  3. Enter the following command: Remove-NetIPAddress -InterfaceAlias (name of adapter) -confirm:$False
    This removes the IP address currently set to the adapter and reverts to a APIPA one
  4. Enter the following command: Remove-NetRoute -InterfaceAlias (name of adapter)
    This removes default gateway configured on the adapter
  5. Enter the following command: New-NetIPAddress -InterfaceAlias (new name for your adapter) -IPAddress (Ip you want) -PrefixLength 24 -DefaultGateway (default gateway for your network)
    This assigns a new IP address, subnet and gateway to your adapter.
    I left the PrefixLenght to 24, that means the subnet is 255.255.255.0. In most cases this is correct, the only reason this would be a different number is if you build your network and therefore know how subnets work.