Today’s post is about disabling IPv6 protocol from given network adapter in Windows operating system using PowerShell. Reasons for disabling it will vary and we are not going to discuss about that topic now. We will purely focus on disabling it using PowerShell.
First task is to get list of network adapters in the computer. If you already know the name of the network adapter for which you want to disable IPv6, then you can proceed to next step directly.
Get-NetAdapter
This will show list of network adapters in the local computer. Let us say I want to check if IPv6 is enabled on network named LocalNetwork and then disable it.
We can first check if it is enabled on LocalNetwork by running below command.
Get-NetAdapterBinding -Name LocalNetwork
You can see in the output that Internet Protocol Version 6 (TCP/IPv6)(ms_tcpip6) is in enabled state. We can now disable it by running below command.
Disable-NetAdapterBinding -Name LocalNetwork -ComponentID ms_tcpip6 -PassThru
You can see the output that this component is disabled now. You can double check by below command again.
Get-NetAdapterBinding -Name LocalNetwork
Please note that above procedure will disable IPv6 on selected network adapter only. If you want to disable on total host, you need to follow separate steps.
Hope this helps.