0

For reasons I don't wish to get in to at the moment I need to occasionally disable Internet Protocol Version 4 (IPv4) on my wireless card, then enable it some time later.

Currently I go into the wireless cards properties and un-check IPv4 and apply it.

Later I will go into that same property screen and re-check the IPv4 box then disable/enable the network adapter to get an IP address.

Is there any way to automate the un-checking/re-checking the IPv4 box?

Thanks ~Mike

0

you could do this in powershell like so:

Disable-NetAdapterBinding -Name MyAdapter -DisplayName "Internet Protocol Version 4 (TCP/IPv4)"

I know your question states batch file, but save this with a .ps1 extension and it should do what you need it to.

  • Also, just to note... Enable-NetAdapterBinding will reverse this. – Fazer87 May 27 '14 at 11:51
  • What version of PowerShell is needed for this? I tried on version 4 and I got Enable-NetAdapterBinding : The term 'Enable-NetAdapterBinding' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. – mikefletcher85 May 27 '14 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.