Disable IPv6 on Server Core with Powershell

Disable IPv6 on Server Core

For whatever reason you may need to disable IPv6 on Server Core or any other server sometimes.

When I was building my new test lab I wanted all servers to communicate and respond to ping only in IPv4. So I started to disable IPv6 on  Server Core via Powershell.


After this the server responded to ping with its IPv4 address but  SCONFIG  > Network Settings >  Network Adapter Settings showed an Invalid Index.

The solution for me was to enable IPv6 on Server Core again. The server still responds in IPv4 and the Network Adapter Settings are available again.

Here are the steps …

Disable IPV6 on Server Core via Powershell:

Switch to Powershell by typing powershell

Check the current status of the Adapter Bindings:

Get-NetAdapterBinding -ComponentID ‘ms_tcpip6’


Disable IPV6:

Get-NetAdapterBinding -ComponentID ‘ms_tcpip6’ | Disable-NetAdapterBinding -ComponentID ‘ms_tcpip6’ -PassThru


It is possible that  Network Settings > Network Adapter Settings >with SCONFIG will show an invalid index after this:

Network Adapter Settings Invalid Index

One answer from a technet forum goes as follows:

( sorry, I just copied the text but do not have the referencing link anymore )

Based on my research, this is a known issue when IPV6 is disabled, we first need IPV6 enabled when configuring an IP address using SCONFIG. Once the IP Address is assigned, you can disable IPV6 afterwords.

This was what did not work for me 🙂  After the IPv4 address was assigned and IPv6 was disabled the server was reachable and responded but the Network Adapter Settings still came with an Invalid Index.
So I enabled IPv6 again and left it this way. Everything works fine until now, the server responds with its IPv4 address.

Enjoy the spring!

Add Remove IP addresses despite the Invalid Index error:
Add IP Address Windows Server

Leave a Reply

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