How to Add IP Addresses to Windows Server

Learn how to add IP addresses to Windows Server with PowerShell, verify the prefix and route, and fix duplicate or unreachable secondary IPs.
A polished 3D Windows server connects several glowing cyan network addresses through one adapter.

To add IP addresses to Windows Server, assign each provider-provisioned address to the correct network adapter with its existing prefix and keep the default gateway on the primary address. The PowerShell method takes about five minutes, survives a reboot, and gives you checks for duplicate addresses and missing provider-side routing.

Prerequisites

  • A Windows Server 2016, 2019, 2022, or 2025 VPS with administrator privileges. The commands also work from an elevated PowerShell window on a supported Windows installation.
  • RDP access or an out-of-band VNC/console session from the VPSLake client area. Keep the console available while changing network settings so you can recover from a wrong gateway or interface selection.
  • The additional IPv4 address, its prefix length or subnet mask, and the primary address details supplied for your VPS. The extra address must already be assigned to the server by VPSLake; adding an unallocated address in Windows will not make it routable.
  • A Windows computer with PowerShell for the configuration. No additional RAM, disk space, Windows role, or domain is required.
  • If you need a Windows VPS with administrator access, see VPSLake Windows RDP hosting.

Step 1: Confirm that the additional address is provisioned

Windows can accept a secondary address only after the hosting provider has routed it to your VPS, so confirm the network details before editing the adapter.

Sign in to the VPSLake client area, open the VPS service, and use the link to launch the VPS control panel (Virtualizor). Check the service’s IP information and note the additional address, prefix or subnet mask, and whether the address is intended for the same interface as the primary address. If the address is not listed, open a ticket before adding anything in Windows.

Open the VPS control panel’s VNC/Console option as a recovery path. You can perform the change through RDP, but do not close the console until the new address passes the checks in the Verify section.

Step 2: Identify the adapter and current IPv4 prefix

The interface alias and prefix length must match the existing Windows network configuration; guessing either value can leave the address unusable.

Open Windows PowerShell → Run as administrator. List active adapters, then inspect the adapter carrying the primary address:

Get-NetAdapter | Where-Object Status -eq 'Up' | Select-Object Name,ifIndex,Status
$InterfaceAlias = "Ethernet"
Get-NetIPConfiguration -InterfaceAlias $InterfaceAlias | Format-List InterfaceAlias,IPv4Address,IPv4DefaultGateway,DNSServer
Get-NetIPAddress -InterfaceAlias $InterfaceAlias -AddressFamily IPv4 | Format-Table IPAddress,PrefixLength,PrefixOrigin,SuffixOrigin,SkipAsSource

Replace Ethernet with the adapter name returned by the first command. A typical result shows the primary address and a prefix such as 24:

IPAddress      PrefixLength PrefixOrigin SuffixOrigin SkipAsSource
---------      ------------ ------------ ------------ ------------
203.0.113.10             24 Manual       Manual       False

The prefix length is the numeric form of the subnet mask: /24 equals 255.255.255.0, while /27 equals 255.255.255.224. Use the exact value supplied for your VPS; do not assume that every server uses /24. Leave the existing default gateway unchanged.

Step 3: Add the secondary address with PowerShell

New-NetIPAddress creates a persistent address on the selected adapter without replacing the primary route. Omitting -DefaultGateway is intentional: a normal Windows server should have one default gateway, not one gateway for every address.

Set the two placeholders and run the command in the elevated PowerShell window:

$AdditionalIP = "ADDITIONAL_IP"
$PrefixLength = PREFIX_LENGTH
New-NetIPAddress -InterfaceAlias $InterfaceAlias -IPAddress $AdditionalIP -PrefixLength $PrefixLength -AddressFamily IPv4 -SkipAsSource $true

Replace ADDITIONAL_IP with the address assigned to your VPS and PREFIX_LENGTH with the numeric prefix from Step 2, such as 24. The -SkipAsSource $true setting keeps Windows from selecting this secondary address for unrelated outbound connections or registering it in DNS; applications can still bind to it directly. If this address must be the source of outbound traffic for a particular application, use -SkipAsSource $false instead and configure that application explicitly.

Microsoft documents the parameters and their behavior in the New-NetIPAddress reference. A successful command returns an object similar to this:

IPAddress      : ADDITIONAL_IP
InterfaceAlias : Ethernet
PrefixLength   : 24
AddressState   : Preferred
SkipAsSource   : True

Add one address at a time. Do not change the primary address to a new static configuration just to add a secondary address, especially when the VPS currently receives its primary settings through DHCP.

Step 4: Use netsh or the Windows interface when needed

The built-in netsh command is useful in a Command Prompt workflow, while the graphical path helps you review the existing gateway and mask before saving.

From an elevated Command Prompt, replace the interface name, address, and mask, then run:

netsh interface ipv4 add address name="Ethernet" address=ADDITIONAL_IP mask=SUBNET_MASK store=persistent skipassource=true

For example, if your provider supplied a /24 prefix, SUBNET_MASK is 255.255.255.0. Do not add a gateway= argument for a secondary address. The Microsoft netsh interface documentation lists the persistent-store and skipassource options.

For the GUI method, open Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings. Right-click the active Ethernet adapter, choose Properties, select Internet Protocol Version 4 (TCP/IPv4), choose Properties → Advanced, and select Add in the IP addresses section. Enter the additional address and its subnet mask, select Add, then select OK through each window. Keep the original default gateway in the adapter’s existing configuration and do not add a second gateway for the new address.

If the adapter is using DHCP, do not switch to a manually configured primary address unless VPSLake supplied every required value, including gateway and DNS servers. PowerShell is safer for adding a single secondary address without disturbing the primary configuration.

Step 5: Bind services to the new address

Adding an address at the operating-system level does not automatically make a web server, database, mail service, or RDP listener use it.

Open the relevant application’s network settings and select ADDITIONAL_IP, or use 0.0.0.0 when the service should listen on every IPv4 address. If the application should be reachable from the internet, create only its required inbound Windows Defender Firewall rule and restrict the remote scope when possible. Assigning an IP by itself opens no TCP or UDP port.

For a hostname, create an A record at your DNS provider that points YOUR_DOMAIN to the additional address. DNS changes and service binding are separate from the Windows adapter configuration, so complete both when the address is for a website or API.

Verify the additional address

First confirm that Windows has the address in the Preferred state and that the original default route is still present:

$AdditionalIP = "ADDITIONAL_IP"
Get-NetIPAddress -IPAddress $AdditionalIP -AddressFamily IPv4 | Format-List IPAddress,InterfaceAlias,PrefixLength,AddressState,SkipAsSource
Get-NetRoute -AddressFamily IPv4 -DestinationPrefix "0.0.0.0/0" | Format-Table NextHop,InterfaceAlias,RouteMetric,PolicyStore

Expected output includes the new address and one normal default route, for example:

IPAddress      : ADDITIONAL_IP
InterfaceAlias : Ethernet
PrefixLength   : 24
AddressState   : Preferred
SkipAsSource   : True

NextHop       InterfaceAlias RouteMetric PolicyStore
-------       -------------- ----------- -----------
203.0.113.1   Ethernet                 25 ActiveStore

If you configured a service to listen on the address, test that service from another computer rather than from the VPS itself:

Test-NetConnection -ComputerName ADDITIONAL_IP -Port SERVICE_PORT

Replace SERVICE_PORT with the port used by the application. A working TCP listener returns TcpTestSucceeded : True. A failed ping alone is not conclusive because Windows Defender Firewall or an upstream filter may block ICMP even when the address and application are working.

Troubleshooting

New-NetIPAddress says the object already exists

The address may already be configured, or another address object with the same value may be present. Run Get-NetIPAddress -IPAddress ADDITIONAL_IP -AddressFamily IPv4; if it appears with AddressState : Preferred, do not add it again. If it is assigned to another host, remove the duplicate from the provider side before continuing.

The command reports an invalid parameter or the address stays unusable

The adapter alias, prefix length, or address format may be wrong. Repeat Step 2, use the exact interface name returned by Get-NetAdapter, and use the provider’s numeric prefix rather than converting a mask from memory. Do not enter the gateway in the secondary-address command.

Windows shows the address, but it cannot be reached externally

This usually means the address is not routed to the VPS, the prefix is wrong, the application is listening only on the primary address, or a provider-level firewall is filtering the traffic. Confirm the address in Virtualizor and the VPSLake client area, check the application’s bind setting, and test the exact service port from another network.

RDP disconnected after using the GUI

The primary address, gateway, or adapter may have been changed instead of adding a secondary address. Use the VPS control panel’s VNC/Console session, restore the original primary settings and single gateway, then add the extra address using Step 3. Keep the console open until RDP reconnects.

Hardening

  • Keep Windows Defender Firewall enabled and permit only the application ports that must use the new address.
  • Use -SkipAsSource $true for service-only addresses so ordinary outbound traffic continues to use the primary address.
  • Restrict application firewall rules to known source ranges when a service does not need public access.
  • Record the address, prefix, service binding, DNS record, and provider allocation so a later Windows rebuild can be repeated accurately.

FAQ

Can several IP addresses use one Windows Server network adapter?

Yes. Windows supports multiple IPv4 address objects on one adapter, which is the normal arrangement for a VPS with additional addresses. Each address still needs to be provisioned and routed by the hosting provider.

Should I add a default gateway for every IP address?

No. Keep one default gateway on the primary interface configuration unless your provider specifically designed a different routing table. A second gateway can create asymmetric routes and intermittent connectivity.

Will the additional IP remain after a reboot?

Yes, New-NetIPAddress creates a persistent configuration by default, and the netsh example explicitly uses store=persistent. Confirm it after a reboot with Get-NetIPAddress before putting production traffic on the address.

Can I use the new address for a website or email server immediately?

The address is only one part of that setup. Bind the service to the address, create the required DNS record, allow its specific firewall port, and configure reverse DNS when the service requires it through the VPS control panel or client-area support.

Samrat Ghosh
Written by

Samrat Ghosh

Founder & Infrastructure Engineer

Samrat Ghosh is the founder of VPSLake, where he builds and runs the remote desktop and VPS hosting infrastructure the company is built on. He writes hands-on guides about RDP, Windows Server, VPS management and secure remote access - the practical documentation he wishes had…

Previous Article

MT4 VPS: Move Your EA and Run It 24/7

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨