{"id":815,"date":"2026-10-12T03:00:00","date_gmt":"2026-10-12T03:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=815"},"modified":"2026-10-12T03:00:00","modified_gmt":"2026-10-12T03:00:00","slug":"configure-static-network-windows-server","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/10\/12\/configure-static-network-windows-server\/","title":{"rendered":"How to Configure a Static Network on Windows Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To configure a static network on Windows Server, assign the IPv4 address, prefix length, gateway, and DNS servers reserved for your VPS. With an elevated PowerShell session and a console fallback ready, the change takes about 10 minutes and leaves you with a repeatable way to check routing and name resolution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A Windows Server VPS running Windows Server 2016, 2019, 2022, or 2025. PowerShell works on Server Core; the graphical path later requires Desktop Experience.<\/li>\n\n\n<li>An active RDP session with a local or domain administrator account, or console access through the VPS control panel. Keep a VNC or console session available before changing a live remote connection.<\/li>\n\n\n<li>The assigned IPv4 address, subnet mask or prefix length, default gateway, and one or two DNS server addresses from your VPSLake service details or support ticket. Do not guess the gateway or reuse values from another server.<\/li>\n\n\n<li>The connected adapter name or interface index, which you will identify in Step 1.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-windows-rdp\">VPSLake Windows RDP server<\/a> if you need a Windows environment for this procedure.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Identify the active network adapter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The correct adapter matters on a VPS because virtual Ethernet devices, disconnected adapters, and loopback interfaces can appear in the same list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Windows PowerShell \u2192 Run as administrator<\/strong> through RDP or the server console. List connected adapters and their current IPv4 settings:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-NetAdapter | Where-Object Status -eq \"Up\" | Format-Table ifIndex,Name,InterfaceDescription,Status,LinkSpeed\nGet-NetIPConfiguration -All | Format-List InterfaceAlias,InterfaceIndex,IPv4Address,IPv4DefaultGateway,DNSServer<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Record the <code>ifIndex<\/code> and <code>Name<\/code> for the adapter that carries the server&#8217;s current connection. A typical result looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ifIndex Name    InterfaceDescription      Status LinkSpeed\n------- ----    --------------------      ------ ---------\n12      Ethernet Microsoft Hyper-V ...    Up     1 Gbps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the exact adapter name returned by your server. It may be <code>Ethernet<\/code>, <code>Ethernet 2<\/code>, or a provider-specific name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Prepare the assigned IPv4 values<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Windows PowerShell uses a CIDR prefix length, not a dotted subnet mask, when <code>New-NetIPAddress<\/code> creates the address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Write down the values supplied for this VPS, then replace every uppercase placeholder in the following block. For example, a subnet mask of <code>255.255.255.0<\/code> corresponds to prefix length <code>\/24<\/code>, but use the prefix that your provider assigned rather than assuming it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$InterfaceAlias = \"YOUR_INTERFACE_ALIAS\"\n$IPAddress = \"SERVER_IP\"\n$PrefixLength = [uint8](\"PREFIX_LENGTH\")\n$Gateway = \"DEFAULT_GATEWAY\"\n$DnsServers = @(\"PRIMARY_DNS\", \"SECONDARY_DNS\")\n$InterfaceIndex = (Get-NetAdapter -Name $InterfaceAlias).ifIndex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>YOUR_INTERFACE_ALIAS<\/code> is the adapter name from Step 1. Replace <code>SERVER_IP<\/code>, <code>PREFIX_LENGTH<\/code>, <code>DEFAULT_GATEWAY<\/code>, and the DNS placeholders with the values shown for your service; do not include the slash in the IP address itself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Apply the static IPv4 configuration with PowerShell<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Applying the address, route, and DNS settings together avoids a partially configured adapter and uses the built-in Windows networking cmdlets documented by Microsoft.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run these commands in the same elevated PowerShell window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-NetIPInterface -InterfaceAlias $InterfaceAlias -Dhcp Disabled\nNew-NetIPAddress -InterfaceAlias $InterfaceAlias -IPAddress $IPAddress -PrefixLength $PrefixLength -DefaultGateway $Gateway -AddressFamily IPv4\nSet-DnsClientServerAddress -InterfaceAlias $InterfaceAlias -ServerAddresses $DnsServers<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>New-NetIPAddress<\/code> creates the address and default route, while <code>Set-DnsClientServerAddress<\/code> makes the chosen resolvers persistent instead of relying on DHCP. The commands normally return no error; your RDP session may briefly pause or disconnect if the address changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are connected over RDP, do not close the console or PowerShell window until the new address has passed the checks in the Verify section. See Microsoft&#8217;s <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/nettcpip\/new-netipaddress?view=windowsserver2025-ps\" target=\"_blank\" rel=\"noopener\">New-NetIPAddress documentation<\/a> and <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/dnsclient\/set-dnsclientserveraddress?view=windowsserver2025-ps\" target=\"_blank\" rel=\"noopener\">Set-DnsClientServerAddress documentation<\/a> for the supported parameters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Configure the same values through the GUI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The graphical method is useful on Desktop Experience when you prefer to review each IPv4 field before saving; use it instead of Step 3, not after it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Control Panel \u2192 Network and Internet \u2192 Network and Sharing Center \u2192 Change adapter settings<\/strong>. Right-click the connected <strong>Ethernet<\/strong> adapter, choose <strong>Properties<\/strong>, select <strong>Internet Protocol Version 4 (TCP\/IPv4)<\/strong>, and choose <strong>Properties<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Select <strong>Use the following IP address<\/strong> and enter the assigned IP address, subnet mask, and default gateway. Select <strong>Use the following DNS server addresses<\/strong>, enter the assigned primary and secondary DNS addresses, and select <strong>OK \u2192 Close<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Leave Internet Protocol Version 6 unchanged unless IPv6 values were also assigned to this VPS. If Windows displays a network-category prompt after saving, keep Windows Defender Firewall enabled and use the profile appropriate for your server&#8217;s security policy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the static address, route, and DNS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The configuration is complete only when Windows shows a manual address, a default route points to the assigned gateway, and a DNS lookup succeeds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following in elevated PowerShell, using the variables from Step 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-NetIPAddress -InterfaceAlias $InterfaceAlias -AddressFamily IPv4 | Format-Table IPAddress,PrefixLength,PrefixOrigin,AddressState\nGet-NetRoute -InterfaceIndex $InterfaceIndex -DestinationPrefix \"0.0.0.0\/0\" | Format-Table DestinationPrefix,NextHop,RouteMetric,State\nGet-DnsClientServerAddress -InterfaceIndex $InterfaceIndex -AddressFamily IPv4 | Format-Table InterfaceAlias,ServerAddresses\nResolve-DnsName www.microsoft.com\nTest-NetConnection -ComputerName www.microsoft.com -Port 443<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The address should show <code>PrefixOrigin<\/code> as <code>Manual<\/code>, the default route&#8217;s <code>NextHop<\/code> should be your assigned gateway, and the DNS query should return one or more records. A successful outbound test includes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>IPAddress PrefixLength PrefixOrigin AddressState\n--------- ------------ ------------ ------------\nSERVER_IP PREFIX_LENGTH Manual      Preferred\n\nTcpTestSucceeded : True<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, test from another network with the server&#8217;s public address. Replace <code>SERVER_IP<\/code> and <code>3389<\/code> with the actual address and RDP port if you changed the default:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Test-NetConnection -ComputerName SERVER_IP -Port 3389<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>TcpTestSucceeded : True<\/code> confirms that the public address reaches the RDP listener. It does not mean every application port is open; Windows Defender Firewall still controls inbound services.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Need a Windows VPS?\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">Windows server access<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Need a Windows VPS?<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Get a Windows RDP server for remote administration with a stable public network address.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-windows-rdp\" aria-label=\"View Windows RDP\">View Windows RDP<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">RDP disconnected after saving the settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The address, prefix length, gateway, or adapter may be wrong, or another device may already use the address. Open the VPS control panel&#8217;s VNC or console session, compare every value with the VPSLake allocation, and correct the configuration there. If the server should return to DHCP temporarily, run this from the console after identifying the adapter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-NetIPInterface -InterfaceAlias \"YOUR_INTERFACE_ALIAS\" -Dhcp Enabled\nSet-DnsClientServerAddress -InterfaceAlias \"YOUR_INTERFACE_ALIAS\" -ResetServerAddresses<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not guess a replacement gateway while trying to restore remote access.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>New-NetIPAddress<\/code> reports that the address already exists<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The adapter already has that IPv4 address or an older static address is still present. Inspect the current entries before removing anything:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-NetIPAddress -InterfaceAlias \"YOUR_INTERFACE_ALIAS\" -AddressFamily IPv4 | Format-Table IPAddress,PrefixLength,PrefixOrigin,AddressState<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If an old address is confirmed and you have console access, remove only that exact address, then rerun Step 3. Replace <code>OLD_SERVER_IP<\/code> with the address you verified; never remove an entry simply because it looks unfamiliar.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Remove-NetIPAddress -InterfaceAlias \"YOUR_INTERFACE_ALIAS\" -IPAddress \"OLD_SERVER_IP\" -Confirm:$false<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">The IP appears correct, but there is no internet access<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A wrong prefix can make the gateway appear unreachable, while a wrong gateway prevents traffic from leaving the local subnet. Compare <code>PrefixLength<\/code> and <code>NextHop<\/code> with the values assigned to this VPS, then rerun the <code>Get-NetRoute<\/code> and <code>Test-NetConnection<\/code> checks. The gateway must be the provider&#8217;s value, not the server&#8217;s own IP address.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Public IP tests work, but domain names do not resolve<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is a DNS configuration problem rather than an IP-routing problem. Confirm the resolver addresses with <code>Get-DnsClientServerAddress<\/code>, then reapply the DNS list from Step 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-DnsClientServerAddress -InterfaceAlias \"YOUR_INTERFACE_ALIAS\" -ServerAddresses @(\"PRIMARY_DNS\", \"SECONDARY_DNS\")\nClear-DnsClientCache\nResolve-DnsName www.microsoft.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the query still fails, check that outbound DNS traffic is permitted by local policy and use the DNS servers supplied for the VPS or your organization.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening after the change<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Keep Windows Defender Firewall enabled and review the active profile before allowing any new inbound service.<\/li>\n\n\n<li>Restrict RDP to trusted source addresses or a VPN where practical; a static IP does not make an administrative port safe by itself.<\/li>\n\n\n<li>Save the assigned IP, prefix, gateway, and DNS values in your password manager or infrastructure notes, and keep console access available for future network changes.<\/li>\n\n\n<li>Configure IPv6 separately only when the provider has assigned an IPv6 address, prefix, and gateway.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why use a static IP on a Windows Server VPS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A static address gives services, DNS records, monitoring systems, and administrators a stable destination. It does not automatically reserve the address with the provider, so use only an address allocated to this VPS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the difference between a subnet mask and a prefix length?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">They describe the same IPv4 network boundary in different forms. Windows PowerShell&#8217;s <code>-PrefixLength<\/code> expects the slash notation number, such as <code>24<\/code>, while the GUI asks for the dotted mask, such as <code>255.255.255.0<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need to restart Windows after setting a static IP?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The NetTCPIP and DNS client cmdlets apply the settings immediately. You may need to reconnect RDP because changing the address interrupts the existing session, but a server restart is normally unnecessary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I configure IPv6 with this guide?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not with the IPv4 commands shown here. IPv6 needs its own assigned address, prefix, gateway, and DNS policy; configure it only from the values supplied for the VPS and verify it separately.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Why use a static IP on a Windows Server VPS?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"A static address gives services, DNS records, monitoring systems, and administrators a stable destination. It does not automatically reserve the address with the provider, so use only an address allocated to this VPS.\"}}, {\"@type\": \"Question\", \"name\": \"What is the difference between a subnet mask and a prefix length?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"They describe the same IPv4 network boundary in different forms. Windows PowerShell's `-PrefixLength` expects the slash notation number, such as `24`, while the GUI asks for the dotted mask, such as `255.255.255.0`.\"}}, {\"@type\": \"Question\", \"name\": \"Do I need to restart Windows after setting a static IP?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. The NetTCPIP and DNS client cmdlets apply the settings immediately. You may need to reconnect RDP because changing the address interrupts the existing session, but a server restart is normally unnecessary.\"}}, {\"@type\": \"Question\", \"name\": \"Can I configure IPv6 with this guide?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Not with the IPv4 commands shown here. IPv6 needs its own assigned address, prefix, gateway, and DNS policy; configure it only from the values supplied for the VPS and verify it separately.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Configure a static network on Windows Server with PowerShell or the GUI, verify routing and DNS, and recover safely from address or gateway mistakes.","protected":false},"author":1,"featured_media":816,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,11],"tags":[49,38,48,42],"class_list":["post-815","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-windows-server","tag-networking","tag-powershell","tag-static-ip","tag-windows-server","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=815"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/815\/revisions"}],"predecessor-version":[{"id":3043,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/815\/revisions\/3043"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/816"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}